Ive been trying to make a stun script but whenever I check if theres not a object named stun in the character the game freaks out,
local Tool = script.Parent
local Player = game.Players.LocalPlayer
local Char = Player.Character
local count = 1
local ResetTime = 4
local LastClick
Tool.Activated:Connect(function()
if Char:FindFirstChild("Stun") then
return
end
if count == 1 then
count = 2
elseif count == 2 then
count = 3
elseif count == 3 then
count = 4
elseif count == 4 then
count = 5
elseif count == 5 then
count = 1
end
end)
The issue is on
if Char:FindFirstChild("Stun") then
return
end