So I’m working on this obby game and there is a dropper stage. But the problem is when I die on that stage, a part of my body is touching the checkpoint to the next stage, causing me to teleport on that checkpoint now when I die. How do I disable this? Thanks!
Can you please provide your checkpoint script? (Just the bit that detects when you get to a new checkpoint)
Is your script checking for .Parent:FindFirstChild("Humanoid")
of a part to see if it’s a character? You could check if that humanoid is alive when the part touches it.
I have no scripts, I used the checkpoint made by roblox
Here’s the script I did to disable the checkpoint when I die
You’re on the right track but it’s not functional in this state. If this is a server-script you could have it listen for an event when the player dies, set AllowTeamChangeOnTouch to false, then set it back to true when the player respawns.
I used the Teams and theres a leaderboard that makes you see what stage you are in
oh ok! I have a question, what part did I do wrong?
local noCheckpoint = script.Parent.AllowTeamChangeOnTouch = false
will error since you’re trying to do two assignments out of syntax. If you wanted to try to work with this code you’d need to change how you handle that line (as well as local no = h.Health = 0
since that will error for the same reason). Try instead:
local noCheckpoint = script.Parent
noCheckpoint.AllowTeamChangeOnTouch = false
You’d then have to separately set it back to true. If you immediately set it to true in the next line, it would be as if it was never set to false, there’s no delay set between those two lines running.
thanks! Does this work when not on the server script service?
Try inserting the script into each individual checkpoint
Yes that’s what I did, heres the script
It still does not work, i tried to separate it into two scripts, here’s the screenshot:
update: I moved it to serverscriptservice