So i have a script here that fires my fireball. But i want to make it so it stops the players movement when they press r to fire it. So how could i go about doing that?
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local RemoteEvent = game.Workspace.Fired
local UIS = game:GetService("UserInputService")
local Debounce = false
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.R then wait(0.5)
if Debounce == true then return end
RemoteEvent:FireServer(Debounce)
end
end)

4 comments
How exactly do i anchor the torso there and unanchor it afterwards?
local torso = Player.Character:FindFirstChild("Torso"), then torso.Anchored = true/false
Wouldn't that enable the character to hover in mid-air while casting the fireball?
As long as the fireball can be cast mid-air, then yes. This is just one method to do it, as he said he wanted to "stop player movement", which this does. Another alternative would be InfernoExeuctioner's method of setting jump power and speed to 0.