i am making a MMORPG game but the swords doesnt seem to work here's the Local Script
local animations = {"5283426957","5283485401","5283529976"} local CanAttack = true script.Parent.Activated:Connect(function() if CanAttack == true then local animation = Instance.new("Animation", script.Parent.Parent) animation.AnimationId = "http://www.roblox.com/asset?id="..animations[math.random(1, #animations)] local chosenanim = script.Parent.Parent.Humanoid:LoadAnimation(animation) chosenanim:Play() CanAttack = false wait(1.5) CanAttack = true script.Parent.CanDamage.Value = true end end)
and here's the normal script
script.Parent.Blade.Touched:Connect(function(p) if script.Parent.CanDamage.Value == true then script.Parent.CanDamage.Value = false p.Parent.Humanoid:TakeDamage(25) end end)
i have a boolvalue in the tool that is turned off
Filtering Enables makes it so anything changed client side won’t affect anything server side. Instead, use a remote event and make sure to check p.Parent:FindFirstChild(“Humanoid”)