GUIs are staying invisible for some reason, what am I doing wrong?

Currently I am working on a dialogue box for an NPC. When the Proximity Prompt to talk to the NPC is triggered, the Image Transparency property in the Image Label is set from 1 to 0, which should make the dialogue box image be visible. While testing this, I noticed that although the Image Transparency is correctly set to 0 after triggering the prompt, the image stays transparent. What am I doing wrong here?

game.Workspace.NPCprompt.ProximityPrompt.Triggered:Connect(function()
	game.StarterGui.Chat2xA.LeftSide.Visible = true
	game.StarterGui.Chat2xA.RightSide.Visible = true
	print("worked")
end)
game.Workspace.NPCprompt.ProximityPrompt.Triggered:Connect(function(Player)
	Player.PlayerGui.LeftSide.Visible = true
	Player.PlayerGui.RightSide.Visible = true
	print("worked")
end)

this should work

2 Likes

@Paysallday44 's post should be the solution!

Here’s an additional explanation of why it is so:

2 Likes

Ok, use game.Players.LocalPlayer.PlayerGui instead of using StarterGui.

1 Like

This worked, thanks! As you can tell, I’m not very good at coding, lol.

No problem! It was my pleasure.

1 Like