Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make a door which you can only pass at a certain amount of "Coins"?

I'm developing a game where you beat an obby and gain leaderstats named Coins. After a certain amount of Coins you are able to go to another room with harder difficulties. I've made the leaderstats as well as the data store to save the leaderstats but i cant figure out how to do this thing. I want to make it so you if you have 50 coins or more you can enter through a door which is normally not enterable.

1 comment

0

I have to see what manages the coin value

1 answer

Try:

local door = game.workspace.Door

local player = game.Player.LocalPlayer
local CoinValue = player.leaderstats.Coin

if CoinValue.Value >= 50 then
	door.Cancollide = false
	door.Transparency = 1
end

This discussion is preserved as it was. New answers, comments, and votes are closed.