Hi, I would like one of my attacks to depend on where the player’s mouse is but I have no idea how to do it.
I guess I’ll have to remove the predefined CFrame that I put on my shares but what will I have to replace it with ?
my local script :
local Player = game:GetService("Players").LocalPlayer
local mouse = Player:GetMouse()
local UIS = game:GetService("UserInputService")
local rp = game:GetService("ReplicatedStorage")
local rimuru = rp:WaitForChild("rimuru")
local debounce = false
local cooldown = 1
UIS.InputBegan:Connect(function(input,isTyping)
if not isTyping then
if input.KeyCode == Enum.KeyCode.F then
if debounce == false then
debounce = true
rimuru:FireServer()
end
end
end
end)
rimuru.OnClientEvent:Connect(function()
wait(cooldown)
debounce = false
end)