Ad
Log in to vote
0

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

Asked by 21 days ago

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

Log in to vote
0
Answered by 16 days ago

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

Ad

Answer this question