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

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

Asked by 2 years ago

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

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

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)
0
thanks dude JmoneyPlayzOfficial 49 — 2y
Ad
Log in to vote
0
Answered by 2 years ago

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.

0
ok i will try that JmoneyPlayzOfficial 49 — 2y
0
ok i tried but it didnt work JmoneyPlayzOfficial 49 — 2y
0
Man, why did you set his answer as GOOD, if its not? Gigaset39 111 — 2y
0
also,the answer is not even true,i checked. Gigaset39 111 — 2y
Log in to vote
0
Answered by
Gigaset39 111
2 years ago
Edited 2 years ago

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)
0
0 ---You can see it Gigaset39 111 — 2y
0
1 --- You CANT see it Gigaset39 111 — 2y

Answer this question