I'm trying to make a simulator game and there is a wall blocking another area which you need 100 cash to pass-through here is the script:
local rc = 100
local debounce = true script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player.leaderstats.Cash.Value >= rc then if debounce then debounce = false script.Parent.Transparency = 0.5 script.Parent.CanCollide = false if rc.Value <= rc then script.Parent.Transparency = 0.15 script.Parent.CanCollide = true end end end end end)
it says that rc doesn't have a value to change but it clearly does how do I fix this?

3 comments
Please use code block or we can't help you.
what is code block
Code Block is the button that has the Lua symbol. Click it and then copy + paste your code in those ~~~~~~~~~~~~.