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

How do I remove a forcefield from a player?

Asked by
Proflts 15
8 years ago

If i were to set a forcefields duration off of a spawn location to the maximum amount of time and then when the game begins I want them to fall onto a brick and it removes it. How would I do that? Please help it means the whole world to people who take time to. <3 to helpers c:

1 answer

Log in to vote
2
Answered by 8 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.
game.Players.PlayerAdded:connect(function(plr) --detect when a player joins
plr.CharacterAdded:connect(function(chr) --when a player respawns
while chr:FindFirstChild("Force Field") ~= nil do wait() end --wait for forcefield to load
local ff = chr:FindFirstChild("Force Field")--create a variable
ff:remove()--remove forcefield
end)
end)
0
Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer. AmericanStripes 610 — 8y
0
o sorry i was just lazy GullibleChapV2 155 — 8y
Ad

Answer this question