Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

The Statement for printing isn't working?

Asked by 4 years ago

My script seems to be working fine its just that the printing doesn't work?

if playerGui:SetTopbarTransparency(1) then --The Transparency is Invisible
    print("1") --Not Printing
end

1 answer

Log in to vote
3
Answered by
IDKBlox 349 Moderation Voter
4 years ago

you're trying to get and set the value at the same time lol

for this to work how you'd like, must use GetTopbarTransparency()

local topBarTransparency = playerGui:GetTopbarTransparency()

if topBarTransparency == 1 then
    print('Its 1')
else
    print('Its ',topBarTransparency)
end
Ad

Answer this question