I have a Tool that casts a spell but instead of using the Tool I want to use a GUI that does the same thing but with Hotkeys.
COMMUNITY QUESTION
How do I make a GUI that casts a spell?
1 answer
I don't understand what you mean whit a GUI that does the same thing whit hotkeys. But I am guessing you're trying to make a script where if you press a button it fires.
Note. It must be written in a local script. And script must be placed in starterplayer.StarterPlayerScripts
--Localplayers Mouse
local mouse = game.Players.LocalPlayer:GetMouse()
--checks if keyisdown.
mouse.KeyDown:connect(function(button)
--Where is says r. Change the key to whatever you want.
if button == "r" then
--Type the magic script here
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
k kool https://developer.roblox.com/en-us/api-reference/class/UserInputService
This is not a request site.
Too broad