I maked a Mouse text on a hover thing for my door but it isn't working the problem is that: Workspace.Mouse Text on hover.Script:6: attempt to index field 'LocalPlayer' (a nil value) And i can't fix it any help? and the script is here: SCRIPT:
local sg = script.Parent:GetChildren()
for i = 1, #sg do
if sg[i].className == "SurfaceGui" then
sg[i].TextLabel.MouseEnter:connect(function()
game.Players.LocalPlayer.PlayerGui.MouseText.NewMouse.Visible = true
game.Players.LocalPlayer.PlayerGui.MouseText.NewMouse.IconText.Text = script.Parent.TextValue.Value
sg[i].TextLabel.MouseLeave:connect(function()
game.Players.LocalPlayer.PlayerGui.MouseText.NewMouse.Visible = false
end)
end)
end
end
I have also a GUI and TextValue. and some more SurfaceGUI but still not works, Anyone help?

2 comments
Still, Not works..
If it is still not working then you still haven't put it in the Player or PlayerGui.