How do i give a player an animation when it touched something like lava, could you also say how i give the player a flame effect or a particle effect for like 3 seconds
-thanks
Put an animation inside the script named Animation, set the Animation ID to the ID of the animation you want, then put this script in the brick
local Anim = script:WaitForChild("Animation") local debounce = false script.Parent.Touched:Connect(function(hit) if (not debounce) and hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Humanoid:FindFirstChild("Animator") and hit.Parent:FindFirstChild("HumanoidRootPart") then debounce = true local track = hit.Parent.Humanoid.Animator:LoadAnimation(Anim) track:Play() local particles = Instance.new("ParticleEmitter") particles.Parent = hit.Parent.HumanoidRootPart wait(3) -- set to how long you want the particles to last for particles.Enabled = false debounce = false wait(10) particles:Destroy() end end)
Closed as Not Constructive by RubenKan
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?