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

Please help me with this script is it broken or something? When I jumped i lost the forcefield

Asked by 6 years ago

When I jumped at the safezone I lost the forcefield

function WalkingOn(connected)
 if not connected.Parent:FindFirstChild("Humanoid") then return end
 if connected.Parent:FindFirstChild("ForceField") then return end
 Instance.new("ForceField", connected.Parent)
end
script.Parent.Touched:connect(WalkingOn)

function DoneWalkingOn(connected)
 if not connected.Parent:FindFirstChild("Humanoid") then return end
 if connected.Parent:FindFirstChild("ForceField") then
  connected.Parent.ForceField:Destroy()
 end
end
script.Parent.TouchEnded:connect(DoneWalkingOn)

https://gyazo.com/634b4ca5032c59122802104ae1418be7

1 answer

Log in to vote
0
Answered by 6 years ago

I suggest you making a square with Transparency 1 and CanCollide = false. Then, detect if the player is touching the entire part.

If this helped you, giving you a idea in anyway, please upvote and accept answer. Though, if this did not help, comment below and tell me the problem or error.

-- Your Orange, BlackOrange3343 PS: Good luck on your game

Ad

Answer this question