When a player resets, the value of "hasPassed" (If a player has passed the simple laser obby) used to be true before they died but now, it just keeps it at false.
How do I keep it at true forever, even if they die?
Script (Type: Normal Script, not local or module, Parent: workspace.Detector):
script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
if hit.Parent:FindFirstChild("Humanoid") then
local hasPassed = player.Character.SprintScript.HasPassed
if hasPassed then
hasPassed.Value = true
end
end
end
end)
Script Explanation:
When a player touched a brick called "Detector", it uses a variable called "player" and it gets the player by getting player from it's character and if the player exists & it has a humanoid then, it also uses a variable called "hasPassed" which is from the player's character and if the boolean value does exist, then the value is true.
