Hello, in my game I have a script that I wrote to execute two values. I wrote this:
local player = game.Players.LocalPlayer
script.Parent.Activated:Connect(function() if player.Debounce.Value == false then game.ReplicatedStorage.RemoteEvents.Power:FireServer(script.Parent.Values)
local action = script.Parent.Parent.Humanoid:LoadAnimation(script.Animation) action:Play() end
end)
And that is what I am using for my simulator, to call on a Folder called "Values" which contains two values, "Cooldown" and "Power" however none of them are working. Clicking on the tool is supposed to add a cooldown value, and a power value, but none of those work, and when I use /console, it doesn't help me much.
I have edited my answer. Click "View Source" beside the code and copy the code. Then paste it in your script. I think this will work correctly.
local player = game.Players.LocalPlayer script.Parent.Activated:Connect(function() if player.Debounce.Value == false then game.ReplicatedStorage.RemoteEvents.Power:FireServer(script.Parent.Values) local character = player.Character or player.CharacterAdded:Wait() local action = character.Humanoid:LoadAnimation(script.Animation) action:Play() end end)
And the player.Debounce.Value
doesn't seem to make any sense to me. Please explain that further if my given script doesn't work.