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

Changing Mouse cursor, can anyone help me fix this?

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

Output please?

1 comment

0

Oh also you have to have a Tool.Equipped event in order to get the mouse.

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