So I'm trying to make a 'SetHealth' command for players, where if they type '/sethealth' and then a number after, it will make their health that number. But the problem is, I know of 0 way to reference that number. I'm trying something like:
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if msg == "/sethealth"..a and a == type.Number then
local H = game.Workspace:WaitForChild(plr.Name).Humanoid
H.Health = a
end
end)
end)
but it's not working /: any help?

6 comments
type(a) == "number"
Bro we discussed this before. Don't just say stuff without context
i'm sure you'd know where to place it lol
Doesn't really warrant an explanation considering you were trying to do the same thing o.O
who me
And actually No, Incapaz, I don't know where to place it.