so what im doing is make a textlabel appear when mouse hovers on a icon
this is the script
script.Parent.MouseEnter:Connect(function()
game.StarterGui.ScreenGui.TextLabel.Visible = true
end)
script.Parent.MouseLeave:Connect(function()
game.StarterGui.ScreenGui.TextLabel.Visible = false
end)
can anyone help
2 Likes
Problem is this: StarterGUI is what will go into a folder inside of the player (game.Players.PlayerGUI) when a player joins the game. You’re only changing the UI inside of StarterGUI, which does not affect the current player’s UI.
How to fix it:
Change “game.StarterGui” to game.Players.LocalPlayer.PlayerGUI
or
Do all of it and not use the “game” command, like this:
script.Parent.Parent.TextLabel.Visible = false (Configure this to how everything is sorted)
6 Likes
the second method worked, thanks!
Codez_X
(Maidenless)
November 25, 2020, 8:02am
#5
First question -
Is the script inside a Part
on a Workspace or Is it inside a TextButton
?
Second question -
If the scripting is inside a Part
did you add a clickdetector inside it?
1 Like
1- a imagebutton
2 - not inside a part
also someone already gave a solution, so you dont need to help ;D
1 Like
Happy I could help you, hope your GUI turns out looking awesome!
1 Like
yeah it turned out pretty fine!