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
for i, player in pairs(game.Players:GetPlayers()) do
local newLabel = Instance.new("TextLabel")
newLabel.Parent = player.PlayerGui.ScreenGui
newLabel.MouseEnter:connect(function()
--code
end)
end
is this right?

3 comments
has player been defined?
yes but i loop through every player running that code with a server script so player changes each time does that affect anything ?
No.