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?