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)
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)
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.
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)