Detect.Touched:connect(function(hit)
if allow and hit.Parent:FindFirstChild("Humanoid") then --and not inuse then
allow = false
inuse = true
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if not checkAllow(plr.Name) then allow = true return end
if plr.PlayerGui:FindFirstChild(Name) == nil and Storage:FindFirstChild(Name) then
Storage:FindFirstChild(Name):Clone().Parent = plr.PlayerGui
end
wait(.5)
wait(0.5)
inuse = true
allow = false
end
end)
Detect.Removal.OnServerEvent:connect(function(plr)
if plr.PlayerGui:FindFirstChild(Name) ~= nil then
inuse = false
allow = true
plr.PlayerGui:FindFirstChild(Name):Remove()
wait(.5)
end
end)
How would i make it so if a certain player uses the dj and is deteced they play a certain anim and then when there not detected the animation stops?
idk how to work with this script/
local human = hit.Parent:findFirstChild("Humanoid")
if human then
local anim = human:LoadAnimation(script.Parent.Animation)
anim:Play()
