So I am completely able to make this code work perfectly fine and nicely on Roblox studio but for some reason it won't work on Roblox player. I'm fairly new to all this but I tried my best to solve it and nothing I did worked. Please help.
script.Parent.ClickDetector.MouseHoverEnter:connect(function()
script.Parent.Parent.Parent.DInfo.SurfaceGui.Dinfo.Visible = true
end)
script.Parent.ClickDetector.MouseHoverLeave:connect(function()
script.Parent.Parent.Parent.DInfo.SurfaceGui.Dinfo.Visible = false
end)
script.Parent.ClickDetector.MouseClick:connect(function(click)
local plr = game.Players.LocalPlayer.Name
game.Players[plr].TeamColor = BrickColor.new("Really red")
script.Parent.Parent.Parent.Done.SurfaceGui.TextButton.Visible = true
end)
This is the code that works fine on studio. I have no clue what to do. What can I do to fix the problem? I am fully aware I can't do local player within a regular script, so what do I do then?

1 comment
Oh I see now. Thank you so much. You have been a great help!