Trying to make a move, in which it increases your hp. I thought i was doing it right but it just doesn’t want to work. I’ve looked around on google and asked in a server and haven’t found nothing or no one knew the problem.
(Local Script)
local UIS = game:GetService("UserInputService")
local event = game.ReplicatedStorage.Rimuru:WaitForChild("Regen")
local debounce = false
local cooldown = 0.1
UIS.InputBegan:Connect(function(input,gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.One then
if not debounce then
debounce = true
event:FireServer()
end
end
wait(cooldown)
debounce = false
end)
(Server Script)
local RS = game:GetService("ReplicatedStorage")
local event = RS.Rimuru:WaitForChild("Regen")
event.OnServerEvent:Connect(function(plr)
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
if humanoid then
humanoid.Health += 15
print("DONE")
end
end)
It prints everything and im making sure health is low but it does nothing at all. Im spending too much stress and time over this.