Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Changing Mouse cursor, can anyone help me fix this?

Asked by 10 years ago

Trying to make it when you hit Z once it changes and Z again to back to the basic: what i currently have is listed below

wait()
local Tool = script.Parent
enabled = true
zoomed = false



function on()
if Mouse then
Mouse.Icon = "http://www.roblox.com/asset/?id=183767324"
end

function off()
if Mouse then
end
Mouse.Icon = "http://www.roblox.com/asset/?id=183710147"
end


function onKeyDown(key)
    if (key~=nil) then
        key = key:lower()
        if (key=="z") and not zoomed then
                on()
        end

            if (key=="z") and zoomed then
                off()
        end
    end
end

1 answer

Log in to vote
0
Answered by 10 years ago

Output please?

0
Oh also you have to have a Tool.Equipped event in order to get the mouse. bobafett3544 198 — 10y
Ad

Answer this question