No errors in output. I swear this worked before in a different project.
1 | local money = 20 |
2 |
3 | script.Parent.Touched:connect( function (work) |
4 | if money > 10 then |
5 | workspace.Block.Transparency = 0 |
6 | end |
7 | 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
1 | local money = 20 |
2 |
3 | script.Parent.Touched:connect( function (work) |
4 | if money > 10 then |
5 | workspace.Block.Transparency = 1 |
6 | end |
7 | 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:
1 | Target = game.Workspace.Block |
2 | ---------------------------- |
3 | local money = 20 |
4 | script.Parent.Touched:connect( function (work) |
5 | if money > = 10 then |
6 | Target.Transparency = 0 |
7 | end ) |
Hope this helped.
I believe its
1 | local money = 20 |
2 | script.Parent.onTouched:connect( function (work) |
3 | blah blah |
4 | blah blah |
5 | script.Parent.Transparency = 1 |
6 | but i dont thin we add ends anyways |