I'm trying to do this with every way I can and some ways are like never gonna work, it's weird but I hope I can find an answer to this question. I'm trying to make it so that if a player touches the brick, he can never touch it again or the code inside the touched event will never run again even if he rejoins Here's the code I tried and didn't work.
local debounce = true
script.Parent.Touched:Connect(function(plr)
if plr.Parent:FindFirstChild("Humanoid") then
script.Parent.BrickColor = BrickColor.new("Really red")
debounce = false
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(player)
debounce = false
end)
end)
end
end)
I tried my best ok?
Script
A ServerScript inside a part inside the workspace.
Thanks.

2 comments
I think you'll need to use DataStore
I will try that ty