Heyo! Does anyone know how to add an if player statement to this script? I'm trying to make it so my user is unaffected by a script that anchors your torso.
game.ReplicatedStorage.TimestopEvent.OnServerEvent:Connect(function(player)
wait(5.1)
local li = Instance.new("PointLight")
li.Parent = player.Character.Head
for i,v in next,player.Character:GetDescendants() do if v:IsA"Part" then v.Anchored = false
end
end
end)
game.ReplicatedStorage.TimestopEvent.OnServerEvent:Connect(function(player)
wait(13.8)
player.Character.Head.PointLight:destroy()
end)

1 comment
what do u mean by if player statement?