Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why Won't The Gui Show Even Though The Script Has No Errors?

I'm making a Doors-like game and I want it to when you collect a book it enables a GUI, but the code doesn't work. It says there's no errors in the script though, does anyone have some ideas? I'm also new to coding

The Code: local ProximityPrompt = script.Parent ProximityPrompt.Triggered:Connect(function() game.StarterGui.Triangle.Number.TextTransparency = 1 game.StarterGui.Triangle.Number.ImageLabel.ImageTransparency = 1 end)

3 answers

✓ Accepted answer

DO NOT GET THE GUI IN THE STARTERGUI! Instead, get the GUI from the PlayerGui! :D

local ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function(playerWhoTriggered)
	playerWhoTriggered.PlayerGui.Triangle.Number.TextTransparency = 1
	playerWhoTriggered.PlayerGui.Triangle.Number.ImageLabel.ImageTransparency = 1
end)

1 comment

0

thanks dude

I think the issue is that transparency should = true or false unless its a part. gui text labels and stuff you do transparency = true or false.

4 comments

0

ok i will try that

0

ok i tried but it didnt work

0

Man, why did you set his answer as GOOD, if its not?

0

also,the answer is not even true,i checked.

HI, put 0 instead of 1:

 local ProximityPrompt = script.Parent ProximityPrompt.Triggered:Connect(function() 
 game.StarterGui.Triangle.Number.TextTransparency = 0 
 game.StarterGui.Triangle.Number.ImageLabel.ImageTransparency = 0 end)

2 comments

0

0 ---You can see it

0

1 --- You CANT see it

This discussion is preserved as it was. New answers, comments, and votes are closed.