Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Can you define and change a player through a regular script?

Asked by 7 years ago

Hello again! I'm making a game similar to Hello Neighbor and I'm developing traps! The trap needs to completely stop you and I've gotten that part, until you press the run key... I'm using a free-modeled run script the imports a local run script into the player. Is there any way I could access the player to disable the script and then after that enable the script until the wait() is over? I'm not asking for a script, I'm just asking if there is any way to do what I said. Thanks!

0
Couldn't you just anchor the player's torso or something so they can't move? User#11440 120 — 7y

2 answers

Log in to vote
0
Answered by
funzrey 58
7 years ago

Yes, you can. Since you asked for no code, I won't give any, if you did want some, sorry :P

0
nice answer User#11440 120 — 7y
0
'Yes' User#11440 120 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

yes, try this:

game.Players.PlayerAdded:connect(function(player) --Player is the player located under game.Players
--Now you can do something like this:
local character = player.Character

character.Humanoid.Health = character.Humanoid.Health - 50

--Or whatever you want
end)
0
What does this have to do with the question? User#11440 120 — 7y

Answer this question