I would like to know how to change this current script into one where it functions when you hit the key "r". I can read it but I can't seem to actually write it myself. Can anyone show me how to change it? I will be able to use your changes on future works.
local Tool = script.Parent;
enabled = true
function onButton1Down(mouse) --I know this is when the left button of the mouse is clicked
if not enabled then
return
end
enabled = false
script.Parent.Mag.Transparency = 1
wait(3)
script.Parent.Mag.Transparency = 0
wait(0)
enabled = true
end
function onEquippedLocal(mouse)
if mouse == nil then
print("Mouse not found")
return
end
mouse.Icon = "http://www.roblox.com/asset/?version=1&id=1430902"
mouse.Button1Down:connect(function() onButton1Down(mouse) end) --so as these
end
Tool.Equipped:connect(onEquippedLocal)
