Hi I'm dumb at scripting on ROBLOX :P Please answer my question down below. :P :) :D So my question is "How do I create CODE that will apply player ForceField when he is in Spawn area, but when he left the area, teleports somewhere else in the world he lost forcefield? " Please Answer me in possibly shorter time! Specially Thanks, everyone who helps!
✓ ANSWER ACCEPTED
[PLEASE HELP] How should I create Player Invincible in SPAWN? {READ MORE}
1 answer
✓ Accepted answer
while true do
for i,v in pairs(game.Workspace:GetChildren()) do
if v.ClassName == "SpawnLocation" then
if (game.Players.LocalPlayer.Character.HumanoidRootPart.Position - v.Position).magnitude >= 20 then -- make twenty the distance you want
game.Players.LocalPlayer.Charcter --Locate the humanoid and then put :Destroy()
else
--Do the opposite for when you get in range of the spawn
end
end
end
wait()
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Look my friend, so that will work in StudioMode because of LocalPlayer...
It is a LocalScript...So it will go in a local parent such as StarterGui or StarterPack. I made it comparable with FE.