local Model = script.Parent
local SafeZoneDetector = Model:WaitForChild("SafeZoneDetector")
SafeZoneDetector.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("HumanoidRootPart") and hit.Parent:FindFirstChild ("SafeZone Protection") == nil then
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
game.Players.LocalPlayer.PlayerGui.ScreenGui.safed.Visible = true
local Forcefield = Instance.new("ForceField")
Forcefield.Name = "SafeZone Protection"
Forcefield.Visible = false
Forcefield.Parent = hit.Parent
end
end)
SafeZoneDetector.TouchEnded:Connect(function(hit)
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = true
local object = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame
object:TweenSize(UDim2.new(0, 0, 0, 0), nil, nil, 60)
wait (60)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("HumanoidRootPart") and hit.Parent:FindFirstChild ("SafeZone Protection") == nil then
hit.Parent:FindFirstChild("SafeZoneProtection"):Destroy()
end
end)
? made this safe zone script but it wont work and ? am not able to see any erors in output any help please

1 comment
Glad I could help :D