RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"whenever you click a tool called damage, you lose 10 health"
-- local script inside the tool called "Damage" local tool = script.Parent local Players = game:GetService("Players") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local function onClick() humanoid.Health = humanoid.Health - 10 end tool.Activated:Connect(onClick)