My script:
local Player = game:GetService("Players")
local debounce = false
function Touched(hit)
if debounce == false then
local player = Player:GetPlayerFromCharacter(hit.Parent)
player:FindFirstChild("StarterGui").Animations.AnimationList.Animationcontroller.Disabled = false
debounce = true
end
end
function TouchEnded(hit)
if debounce == true then
local player = Player:GetPlayerFromCharacter(hit.Parent)
player:FindFirstChild("StarterGui").Animations.AnimationList.Animationcontroller.Disabled = true
debounce = false
end
end
script.Parent.Touched:Connect(Touched)
script.Parent.TouchEnded:Connect(TouchEnded)
It doesn't work for me any suggestions?
