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)
you could just add an if clause surrounding the FireServer() function.
if game:GetService("Players").LocalPlayer.Character and game:GetService("Players").LocalPlayer.Character:FindFirstChildWhichIsA("Tool") then :FireServer() end