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.
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