enabled = true
local function OnTouched(hitPart)
if not enabled then
return
end
enabled = false
local plyr = hitPart:FindFirstChild("Humanoid")
if plyr then
local Suffocate = Instance.new("Animation")
Suffocate.AnimationId = "http://www.roblox.com/Asset?ID=276272282"
local animTrack = plyr:LoadAnimation(Suffocate)
animTrack:Play()
end
end
OxygenSuckDMG.Touched:connect(OnTouched)
I want to play an animation in Players when they touch the part called OxygenSuckDMG however it will not work. Pls help.
