Greetings, I’ve been trying to make a move system for a game, but when I attempt to fire a remote event I don’t think it does anything.
Code:
Local Script
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
UserInputService.InputBegan:Connect(function(Input, isTyping)
if isTyping then return end
if Input.KeyCode == Enum.KeyCode.F then
ReplicatedStorage.Remotes.Moves.Ability.Hit:FireServer()
end
end)
Server Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Cooldown = false
ReplicatedStorage.Remotes.Moves.Ability.Hit.OnServerEvent:Connect(function(Player)
local Character = Player.Character
local RArm = Character:WaitForChild("RightArm")
if Cooldown == false then
print("Hit for".. Damage.. "Damage!")
end
end)
I haven’t exactly coded anything in yet, so it should just be printing, but it isn’t. Any help would be appreciated.