local LocalPlayer = game:GetService("Players").LocalPlayer
local Checkpoint1 = game.Workspace:WaitForChild("Checkpoint1")
Checkpoint1.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and debounce == false then
debounce = true
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr and plr == LocalPlayer then
print(plr.Name)
Checkpoint1:Destroy()
end
end
end)
local Players = Game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
Halo1.Touched:Connect(function(hit)
if hit.Parent:IsA("Model") and Players:GetPlayerFromCharacter(hit.Parent) and Players:GetPlayerFromCharacter(hit.Parent) == LocalPlayer then
Halo1.Transparency = 1
wait(25)
Halo1.Transparency = 0
end
end)
If you used the character, you would also need to check if the character exists, otherwise you will run into errors. However, if you check if the player matches, you don’t need to check if the player is exists because player exists throughout the existence of the Local Script.