Ad
Log in to vote
1

how to make a wall that you can walk through when you have 1000 currencies?

Asked by 9 days ago

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

0
Use a local script to set the propertie cancolide to fasle or just delete the part Dragon_meck 2 — 9d
0
also use if statement to see if they have over 1000 currency Dragon_meck 2 — 9d
0
Have the Server set a falsy CollisionGroup when their currency reaches 1k. Ziffixture 6785 — 9d

2 answers

Log in to vote
0
Answered by
Xapelize 1095 Moderation Voter
9 days ago

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
0
If you want to make a script, its harder and its server sided. Everyone can pass through instead of just him. Xapelize 1095 — 9d
Ad
Log in to vote
0
Answered by 9 days ago

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.

Answer this question