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

Custom mouse id works in roblox studio but not in game. why?

So I have a gun that when u equip it u have a custom cursor but the problem is that it works in roblox studio but not in game.

code:

pistol.Equipped:Connect(function()
	local reloadButton = ContextActionService:BindAction("ReloadButton", reloadMobile, true, "")

	ContextActionService:SetPosition("ReloadButton", UDim2.new(0.45, 0, 0, 0))

	ContextActionService:SetImage("ReloadButton", "http://www.roblox.com/asset/?id=1398003510")

	reloadButton = true

	mouse.Icon = "http://www.roblox.com/asset?id=12170520935"

	ammoText.Text = ammo.Value
	magText.Text = magazine.Value

	ammoFrame.Visible = true
	ammoGui.Enabled = true
	
	mouseMiddle.Visible = true
end)

pistol.Unequipped:Connect(function()	
	ContextActionService:UnbindAction("ReloadButton")

	mouse.Icon = "rbxasset://SystemCursors/Arrow"

	ammoFrame.Visible = false
	ammoGui.Enabled = false
	pistol.IsReloading.Value = false
	pistol.IsShooting.Value = false
	
	mouseMiddle.Visible = false
end)

any help is apreciated

1 answer

Problem solved, if u want to make a custom cursor, u have to make it the perfect size wich is 255x255 pixels.

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