Hi, I’m making a ProximityPrompt that places you on a specific position an orientation when used, and it plays an animation on you too.
The problem is when more than 1 player uses it. Everything works fine with the “usePrompt” (the prompt that gives you the position and animation), but when the “backPrompt” (the prompt that stops the animation) is used, the animation stops for everyone who is having the animation too (they are still on “usePrompt” mode, so they still see the “backPrompt”).
Here is the current script:
workspace.Proxim.usePrompt.Triggered:Connect(function(player)
local animation = script:WaitForChild('Animation')
local humanoid = player.Character:WaitForChild('Humanoid')
local anim = humanoid:LoadAnimation(animation)
anim:Play()
player.Character.HumanoidRootPart.Position = workspace.tpspyglass.Position
player.Character.HumanoidRootPart.Orientation = workspace.tpspyglass.Orientation
workspace.Proxim.backPrompt.Triggered:Connect(function(player)
anim:Stop()
end)
end)
Here is a Gyazo Gif that shows how it works: https://gyazo.com/8c65434f143b48c02e7594d603b9b346
And here is another Gif that shows the error: https://gyazo.com/0da9b9f7491e364e2e7a47b93b3f3440
Can someone help me with this? What do I have to add/change in the script? Thank you!

