So, I have this code on multiple parts that checks if a player already has a forcefield. If they don't, they are given one. Then, on another part I have a code that checks if a player has one, then removes it. But, sometimes I have a random forcefield spawning at 0, 0, 0. I don't know why this is. Any ideas?
Here are my 2 different codes:
script.Parent.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
if not player.Character:FindFirstChild("ForceField") and player.Character.Humanoid then
local ff = Instance.new("ForceField", player)
end
end
end)
