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

How do I add a ForceField to a character every time it spawns?

Asked by 11 years ago

How do you Create a ForceField that will stay on your character for the rest of the time you spent in the game? I've been trying to figure this out for weeks.

-Liftin

3 answers

Log in to vote
7
Answered by 11 years ago

You simply create a new ForceField object in the character model.

This should do the trick:

1game.Players.PlayerAdded:connect(function(player)
2    player.CharacterAdded:connect(function(character)
3        Instance.new("ForceField", character)
4    end)
5end)
Ad
Log in to vote
4
Answered by
MunimR 125
11 years ago

Just apply a ForceField to the character model and it should do! So just have a script that detects when the character respawns and then add a forcefield... :)

1Game:GetService"Players".PlayerAdded:connect(function(Player)
2    Player.CharacterAdded:connect(function(Character)
3        Instance.new("ForceField",Character)
4    end)
5end)

wow 9 seconds.... really....

1
Hah. User#11893 186 — 11y
0
kay time to post somewhat productive questions for reputation MunimR 125 — 11y
Log in to vote
0
Answered by 11 years ago

Do you mean just every time or forever because you can just click the force field enable on the spawn properties. Much easier than a script.

Answer this question