local part = script.Parent part.Touched:Connect(function(hit) local view = hit.Parent:FindFirstChild("Union") if view then script.Parent.Anchored = true print("Player see") else print("player unsee") script.Parent.Anchored = false end end)
i am scripting SCP 173 and in the output only "Player see" repeat while "Player unsee" works only when spawning
Try when a player touches it check if it is a player like elseif
local part = script.Parent part.Touched:Connect(function(hit) local view = hit.Parent:FindFirstChild("Union") if view then script.Parent.Anchored = true print("Player see") elseif not view then print("player unsee") script.Parent.Anchored = false end end)
If it errors let me know