Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I remove a forcefield from a player?

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

✓ Accepted 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)

2 comments

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.

0

o sorry i was just lazy

This discussion is preserved as it was. New answers, comments, and votes are closed.