Answered by
8 years ago Edited 8 years ago
You're using functions wrong.
To use the Remove function
, you use : after the thing you want to Remove.
Don't use Remove.
Remove is deprecated
, and you should be using Destroy()
.
2 | game.Players.LocalPlayer.Character.Stun:Destroy() |
4 | game.Players.LocalPlayer.Character.Stun:Destroy() |
Make sure you're using a Local Script.
Only Local Scripts
can access Local Player
.
3 | game.Players.LocalPlayer.Character.Stun:Destroy() |
5 | game.Players.LocalPlayer.Character.Stun:Destroy() |
Both of these lines of code do the same thing.
If you want to continuously Destroy the Stun, use a while loop
.
2 | game.Players.LocalPlayer.Character.Stun:Destroy() |
Also, use variables,
2 | local plr = game.Players.LocalPlayer |
3 | local char = plr.Character or plr.CharacterAdded:wait() |
4 | local Stun = char:WaitForChild( "Stun" ) |
This script could also be placed elsewhere , but I would suggest not doing this.
I don't like using loops, and there's probably a better way of solving your problem, but you gave no context, sorry.
Hope I helped.
Good Luck!
If I did help, don't forget to accept my answer.