Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

When a player rejoins, the mouse is reset. Fixes?

I have a localscript in startergui that changes the mouse icon that works, but when the player rejoins it's auto reset to the default mouse. I tried using game.Players.PlayerAdded:Connect, but that failed. Nothing in the output, etc.

Attempt #1 (works):

	local mouse = game.Players.LocalPlayer:GetMouse()
	mouse.Icon = "rbxassetid://1386173173"

Attempt #2 (failed):

game.Players.PlayerAdded:Connect(function()
	local mouse = game.Players.LocalPlayer:GetMouse()
	mouse.Icon = "rbxassetid://1386173173"
end)

1 answer

✓ Accepted answer

The reason why is that you're calling the playeradded event in a local script.

local mouse = game:GetService("Players").LocalPlayer:GetMouse()
mouse.Icon = ""rbxassetid://1386173173" 

This discussion is preserved as it was. New answers, comments, and votes are closed.