is it possible that I could get some help? I got it all to work but I would like the poison damage to change depending on what's inside of the tower's config, but I'm not sure how to access the tower's config though the mob script.
i think you could make a config named like PoisonDamage and then instead of making the poison damage a number do like = Tower.Config.PoisonDamage.Value
Is there a way you could make the poison damage ptoportional to the tower's damage? Like for example a tower does 15 damage, ans the poison also does 15 damage 7 times?
[sorry for late response] just change out the "1" for the tower's damage or you could make a DoT thingy in the towers config for a different damage [example: the first blow is 15 damage but the poison is 24]
@Why-Just [sorry for the later response 😭] I want it to do the tower's damage specifically though. Like if a tower does 15 damage and poisons an enemy, the enemy takes 15 damage 7 times. But then if another tower does 24 damage and hits the enemy, the enemy will take 24 damage 7 times if that makes sense
@@hahafebruary14th [oh hey look a response on time] maybe try making multiple types of "poison" with different damage values (example: fire, bleed, poison) and then having the respective towers use that type
anyone can help me evertime i place any towers it dont attack the zombie sometimes it only attack the first zombie then nothing i dont see problem of my script there no warning none i try make this idk whats problem anyone can help me pls
is there anyway to make it so you can make it do more damage? Like when it is not upgraded it's deals like 10 damage every second but when it is upgraded it deals 25 every second
I know I'm probably late for this to ask but the poison works but the mob kept getting poisoned. I even tried to place some particles for the visual effects but the particle works just fine, only the poison. And also the "IsPoison" Value is always set to true even if I tried to set it to false manually it will just change to true again. The "PoisonTime" Value just go to negatives and I copied your code in an exact same thing
i already did that 3 months ago the video its very late to date but the code its very weird it can be simplified with other method but yea it can be better
the mobs not get the poison , can u help me to see what wrong, please help tower : local PhysicsService = game:GetService("PhysicsService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local events = ReplicatedStorage:WaitForChild("Events") local animateTowerEvent = events:WaitForChild("AnimateTower") local functions = ReplicatedStorage:WaitForChild("Functions") local spawnTowerFunction = functions:WaitForChild("SpawnTower") local requestTowerFunction = functions:WaitForChild("RequestTower") local sellTowerFunction = functions:WaitForChild("SellTower") local changeModeFunction = functions:WaitForChild("ChangeTowerMode") local maxTowers = 8 local tower = {} function tower.FindTarget(newTower, range, mode) local bestTarget = nil
local bestWaypoint = nil local bestDistance = nil local bestHealth = nil local map = workspace.Map:FindFirstChildOfClass("Folder")
for i, mob in ipairs(workspace.Mobs:GetChildren()) do local distanceToMob = (mob.HumanoidRootPart.Position - newTower.HumanoidRootPart.Position).Magnitude local distanceToWaypoint = (mob.HumanoidRootPart.Position - map.Waypoints[mob.MovingTo.Value].Position).Magnitude
if distanceToMob = bestWaypoint then bestWaypoint = mob.MovingTo.Value
if not bestDistance or distanceToWaypoint < bestDistance then bestDistance = distanceToWaypoint bestTarget = mob end end elseif mode == "Last" then if not bestWaypoint or mob.MovingTo.Value bestDistance then bestDistance = distanceToWaypoint bestTarget = mob end end elseif mode == "Strong" then if not bestHealth or mob.Humanoid.Health > bestHealth then bestHealth = mob.Humanoid.Health bestTarget = mob end elseif mode == "Weak" then if not bestHealth or mob.Humanoid.Health < bestHealth then bestHealth = mob.Humanoid.Health bestTarget = mob end end end end
return bestTarget end function tower.Poison(newTower, target, duration) if not target then return end
local statusEffects = target:FindFirstChild("StatusEffects") local targetHum = target:FindFirstChild("Humanoid") local isPoisoned = statusEffects:FindFirstChild("IsPoisoned") local poisonTime = statusEffects:FindFirstChild("PoisonTime")
if not targetHum or not target then return end
if statusEffects and poisonTime and duration >= poisonTime.Value then poisonTime.Value = duration end end function tower.Attack(newTower, player) local config = newTower.Config local target = tower.FindTarget(newTower, config.Range.Value, config.TargetMode.Value)
if target and target:FindFirstChild("Humanoid") and target.Humanoid.Health > 0 then if config:FindFirstChild("PoisonTime") then tower.Poison(newTower, target, config.PoisonTime.Value) end local targetCFrame = CFrame.lookAt(newTower.HumanoidRootPart.Position, target.HumanoidRootPart.Position) newTower.HumanoidRootPart.BodyGyro.CFrame = targetCFrame
When you animate your tower attack animation, make sure the part or projectile that you want to animate is not welded to the Handle but is a joint. To do so you need a plugin. I forgot what the name was but just search up “how to animate shooting in roblox” sadly you need moon animator
is it possible that I could get some help? I got it all to work but I would like the poison damage to change depending on what's inside of the tower's config, but I'm not sure how to access the tower's config though the mob script.
i think you could make a config named like PoisonDamage and then instead of making the poison damage a number do like = Tower.Config.PoisonDamage.Value
Is there a way you could make the poison damage ptoportional to the tower's damage? Like for example a tower does 15 damage, ans the poison also does 15 damage 7 times?
[sorry for late response] just change out the "1" for the tower's damage or you could make a DoT thingy in the towers config for a different damage [example: the first blow is 15 damage but the poison is 24]
@Why-Just [sorry for the later response 😭] I want it to do the tower's damage specifically though. Like if a tower does 15 damage and poisons an enemy, the enemy takes 15 damage 7 times. But then if another tower does 24 damage and hits the enemy, the enemy will take 24 damage 7 times if that makes sense
@@hahafebruary14th [oh hey look a response on time] maybe try making multiple types of "poison" with different damage values (example: fire, bleed, poison) and then having the respective towers use that type
Create a new value then name it poisiondamage then if the tower shoots at it sets its damage to whatever damage yoh want
anyone can help me evertime i place any towers it dont attack the zombie sometimes it only attack the first zombie then nothing i dont see problem of my script there no warning
none i try make this idk whats problem anyone can help me pls
I too have this problem and I've yet to figure out the problem
can you make a video that shows how to make abilities on a zombie like, summon, stomp, or anything?
can you make a tutorial on like when your placing a tower it has a key bind thing popup that follows the mouse like in TDS?
is there anyway to make it so you can make it do more damage? Like when it is not upgraded it's deals like 10 damage every second but when it is upgraded it deals 25 every second
I know I'm probably late for this to ask but the poison works but the mob kept getting poisoned. I even tried to place some particles for the visual effects but the particle works just fine, only the poison. And also the "IsPoison" Value is always set to true even if I tried to set it to false manually it will just change to true again. The "PoisonTime" Value just go to negatives and I copied your code in an exact same thing
It did work good
But if a summon enemy spawn its unit, it break complete until you place or upgrade again
I watched the stun video and know I have like 20 lines saved now
Damn deserves more traction and view gain. Just one question are you considering making like a dj or Commander type unit? Hope you get to 300!
ruclips.net/video/FwME2D7tY7g/видео.html
@@marat1980 thx 🙏
Do u have plans to make skins too I’m just wondering it has someone made that or is it too complex?
Does mob aslo can have number value for defense? Because i want each of my enemies mob to hve each different defenses like one enemy with 5 defense
yes that's literally what's already set up for you to do. 9 months later lol
How to make a skin shop
Yes
I keep spelling poisoned, "posioned" so it slows me down
Make one for like the gui where the next upgrade stats show up
It Said "attempt to compare number
Also I Have Problem That my Towwer Is Deal 2x Damage Instead of Poison Damage
i already did that 3 months ago the video its very late to date but the code its very weird it can be simplified with other method but yea it can be better
It works but the other towers doest take damage to mob. But poison does damage to mob. Why and pls how to fix this
What?
i wrote everything right but it says that the enemy doesn't have the poison value, how do i fix that?
same
Skull 💀
the mobs not get the poison , can u help me to see what wrong, please help
tower :
local PhysicsService = game:GetService("PhysicsService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local events = ReplicatedStorage:WaitForChild("Events")
local animateTowerEvent = events:WaitForChild("AnimateTower")
local functions = ReplicatedStorage:WaitForChild("Functions")
local spawnTowerFunction = functions:WaitForChild("SpawnTower")
local requestTowerFunction = functions:WaitForChild("RequestTower")
local sellTowerFunction = functions:WaitForChild("SellTower")
local changeModeFunction = functions:WaitForChild("ChangeTowerMode")
local maxTowers = 8
local tower = {}
function tower.FindTarget(newTower, range, mode)
local bestTarget = nil
local bestWaypoint = nil
local bestDistance = nil
local bestHealth = nil
local map = workspace.Map:FindFirstChildOfClass("Folder")
for i, mob in ipairs(workspace.Mobs:GetChildren()) do
local distanceToMob = (mob.HumanoidRootPart.Position - newTower.HumanoidRootPart.Position).Magnitude
local distanceToWaypoint = (mob.HumanoidRootPart.Position - map.Waypoints[mob.MovingTo.Value].Position).Magnitude
if distanceToMob = bestWaypoint then
bestWaypoint = mob.MovingTo.Value
if not bestDistance or distanceToWaypoint < bestDistance then
bestDistance = distanceToWaypoint
bestTarget = mob
end
end
elseif mode == "Last" then
if not bestWaypoint or mob.MovingTo.Value bestDistance then
bestDistance = distanceToWaypoint
bestTarget = mob
end
end
elseif mode == "Strong" then
if not bestHealth or mob.Humanoid.Health > bestHealth then
bestHealth = mob.Humanoid.Health
bestTarget = mob
end
elseif mode == "Weak" then
if not bestHealth or mob.Humanoid.Health < bestHealth then
bestHealth = mob.Humanoid.Health
bestTarget = mob
end
end
end
end
return bestTarget
end
function tower.Poison(newTower, target, duration)
if not target then return end
local statusEffects = target:FindFirstChild("StatusEffects")
local targetHum = target:FindFirstChild("Humanoid")
local isPoisoned = statusEffects:FindFirstChild("IsPoisoned")
local poisonTime = statusEffects:FindFirstChild("PoisonTime")
if not targetHum or not target then return end
if statusEffects and poisonTime and duration >= poisonTime.Value then
poisonTime.Value = duration
end
end
function tower.Attack(newTower, player)
local config = newTower.Config
local target = tower.FindTarget(newTower, config.Range.Value, config.TargetMode.Value)
if target and target:FindFirstChild("Humanoid") and target.Humanoid.Health > 0 then
if config:FindFirstChild("PoisonTime") then
tower.Poison(newTower, target, config.PoisonTime.Value)
end
local targetCFrame = CFrame.lookAt(newTower.HumanoidRootPart.Position, target.HumanoidRootPart.Position)
newTower.HumanoidRootPart.BodyGyro.CFrame = targetCFrame
animateTowerEvent:FireAllClients(newTower, "Attack", target)
target.Humanoid:TakeDamage(config.Damage.Value)
if target.Humanoid.Health
same
Whats the error?
you putted it in the tower module.
2 videos inside in a video how
Oh god finallyyyyy
you're soo underated
Очень полезное видео! Вы можете сделать так чтобы к примеру башня лучника стреляла стрелой в зомби или снежкометчик кидал снежок в зомби и тд?
When you animate your tower attack animation, make sure the part or projectile that you want to animate is not welded to the Handle but is a joint. To do so you need a plugin. I forgot what the name was but just search up “how to animate shooting in roblox” sadly you need moon animator
burst towers cant attack hiddens
You just have to put on tower config
works thanks bro
it doesn't work :(
make a code tutorial please
3:52
why is the text russian?
It doesnt work for me idk why
Same it just makes my monsters stuck in the start
2:04
how to make flame damage?
Poison damage = flame damage
Харош ❤😊😮😢🎉
Спасибо тебе ты лучший
Это круто :D
Nice
doesn't work, don't try it
thanks
anyone have the scripts
2 in 1 no way
Ответе мне
this tutorial is scam! 😡