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

0

type(a) == "number"

0

Bro we discussed this before. Don't just say stuff without context

0

i'm sure you'd know where to place it lol

0

Doesn't really warrant an explanation considering you were trying to do the same thing o.O

0

who me

0

And actually No, Incapaz, I don't know where to place it.