Alright so im making a game where i write out a few textlabels in code and i need to give them events right now im just giving it an event striaght up but its not working
heres what i have
1 | for i, player in pairs (game.Players:GetPlayers()) do |
2 | local newLabel = Instance.new( "TextLabel" ) |
3 | newLabel.Parent = player.PlayerGui.ScreenGui |
4 |
5 | newLabel.MouseEnter:connect( function () |
6 | --code |
7 |
8 | end ) |
9 | end |
is this right?
I think assigning a value to player would help a bit. Other than that its fine
Mouse functions are not included in Text Label objects. I learnt that a while ago.
For your event to work, simply change the Text Label into a Text Button. Mouse functions work for Text Buttons.
Your welcome.