Why isnt Part1 Transparency not 0?

Do you want the part to be transparent? If yes then set it to 1

i want to able to see the Part1 as i am currently unable to

Since we don’t know what the game, especially Part and Part1, is and are, we can only guess. But in this case, when the player touches Part and has enough Coins, Part gets deleted and Part1 gets shown. Part1.Transparency = 0 means it gets visible because a transparency of 1 means it’s fully transparent, i.e. invisible, vs. 0 means it’s fully visible. So in short > Part gets deleted, Part1 made visible.

Thats correct although when Part is touched but user does have 200 coins, the transparency of part1 isnt 0

It’s because Coins Value is greater than 200 so it will not continue your script

1 Like


These are Part and Part1

Yes, you’re checking it’s LESS than 200. In which it won’t run. Try checking it’s greater or equal to using this operator: >=.

Sorry, im struggling to understand what you mean, this is my 1st game i have coded

Remove the line where you check if the Coins.Value is less then 200. Your code will work.

Coins.Value is 201 and you check in your if that is less than 200

image
This 1, i have said if Coins.value is more than or equal to 200 then transparency = 0 ect

Yes, spoiler[/spoiler]

I was going to add if not then a gui will come up saying you cant afford it, so i need that

If you want to do that, you can implement an else statement after the code.

if humanoid and Coins.Value >= 200 then
    -- code if it's greater
else
    -- put the gui here
end
1 Like

image

Coins.Value = 201
if humanoid and Coins.Value < 200 then
unless ofc it changes then sorry my confusion


So i delete this line here?

Yes, and then after that second if statement do the else statement I showed you before.

Oh yes perfect, thank you so much, like i said im a beginner and the first thing i actually could do, i was getting in a mess with my own code!

1 Like

Thanks, if I solved make sure to mark one of my answers as the solution so everyone knows it’s solved!