No errors in output. I swear this worked before in a different project.
local money = 20 script.Parent.Touched:connect(function(work) if money > 10 then workspace.Block.Transparency = 0 end end)
I'm getting really sick of scripting tbh. Nothing ever works
What you need to fix is what the transparency is set to. Your code is correct its just that you need to use a 1 instead of a 0
local money = 20 script.Parent.Touched:connect(function(work) if money > 10 then workspace.Block.Transparency = 1 end end)
For transparency you can pick numbers between 1-0 (side note: numbers bigger than one and less than 0 can be used but wont change much as something cant be more invisible then 100% and something can't be less than 0% invisible) the bigger the number you put the more transparent the object will be while the less the number you put the more visible it will be.
Try this:
Target = game.Workspace.Block ---------------------------- local money = 20 script.Parent.Touched:connect(function(work) if money >= 10 then Target.Transparency = 0 end)
Hope this helped.
I believe its
local money = 20 script.Parent.onTouched:connect(function(work) blah blah blah blah script.Parent.Transparency = 1 but i dont thin we add ends anyways