How to make a wall through which you can go only if you have the right amount of currency (currency added every 5 seconds) (script) please because the youtube guides did not work for me
how to make a wall that you can walk through when you have 1000 currencies?
2 answers
Make the player client (use LocalScript to access clients) collide false the 1k currency when they have 1k. Your script should look like this:
(LOCALSCRIPT)
if game.Players.LocalPlayer.leaderstats.Currency.Value = 1000 then
script.Parent.CanCollide = false
end
1 comment
If you want to make a script, its harder and its server sided. Everyone can pass through instead of just him.
To extend on the previous answer, I'd suggest putting the LocalScript in something like StarterGui and putting this inside it:
game.Players.LocalPlayer.leaderstats.[Insert Currency Here].Value.Changed:connect(function()
if game.Players.LocalPlayer.leaderstats.[Insert Currency Here].Value < 999 then
game.Workspace.[Insert Door Name Here].CanCollide = false
end
end)
The previous script, on closer inspection, actually wouldn't work at all! First of all, they made a mistake when detecting if it was equal to 1000. They put "=" instead of "==". Secondly, they weren't supposed to detect if it was equal to it at all! They were supposed to detect if it was equal to or bigger than it. Thirdly, they forgot to put any form of trigger on it. So, the script would only detect it if the player only just joined the game, and no time during the actual gameplay. I've given you an (untested) script that fixes all of these. Please tell me if it works. If it doesn't, I can take a closer look at it.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Use a local script to set the propertie cancolide to fasle or just delete the part
also use if statement to see if they have over 1000 currency
Have the Server set a falsy CollisionGroup when their currency reaches 1k.