heres the local script so i want it to fire the server only if player is holding the tool
help
its a local script btw
tell me if you want the script ////////////////////////////
local Player = game:GetService("Players")
local rp = game:GetService("ReplicatedStorage")
local MaxKobosRemotes = rp:WaitForChild("MaxKobosRemotes")
local KiritoJumpSlash = MaxKobosRemotes:WaitForChild("KiritoJumpSlash")
local tool = script.Parent
local UIS = game:GetService("UserInputService")
local debounce = false
local cooldown = 7
UIS.InputBegan:Connect(function(input,isTyping)
if isTyping then
return
elseif input.KeyCode == Enum.KeyCode.E and debounce == false then
debounce = true
KiritoJumpSlash:FireServer()
end
end)
KiritoJumpSlash.OnClientEvent:Connect(function()
wait(cooldown)
debounce = false
end)

5 comments
do i put it at the KiritoJumpSlash:FireServer()?
its not working
okay let's start off with this. who saves replicated storage in a local as rp. anyway, yes ofc you put KiritoJumpSlash he didnt feel like putting it because he prolly didnt read all the locals and figured you'd have enough brain cells to figure that out. If it still doesnt work after you fix that, then there is a problem that you did not include in the question.
man all i want to do is to make the local script fire KiritoJumpSlash:FireServer() only if players tool is equipped, then he said / FindFirstChildWhichIsA("Tool") / wich doesnt fixed anything since there could be another tool equipped now can you help me with my problem please?
FindFirstChildWhichIsA("Tool") is a way of checking if a tool is equipped, you didn't mention it needed to be a specific tool. In this case you can just add another check if game:GetService("Players").LocalPlayer.Character:FindFirstChildWhichIsA("Tool") == tool then (tool being your local variable of tool, assuming it is pointing to the relevant tool object), it should work for that.