Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why is this not changing the stats of my humanoid?

Why is this not changing the stats of my humanoid?

What am I doing wrong / how can I fix this:

game.Players.PlayerAdded:connect(function(plr)
	if plr.Name == "Nanaluk01" then
		repeat
			local creator = game.Workspace:FindFirstChild("Nanaluk01")
			creator.Humanoid.WalkSpeed = 60
			creator.Humanoid.MaxHealth = 1000
			creator.Humanoid.Health = 1000
			creator.Humanoid.JumpPower = 150
			wait(0.1)
		until creator == nil
		
	end
end)

1 answer

✓ Accepted answer

Ok, so you are stating that a player is in the workspace, when actually a player is in game.Players

local creator = game.Players:findFirstChild("Nanaluk01")

--Should work fine

Edit

I re-read it, and I see that you are checking to see if plr name is Nanaluk01. Which isn't so efficient I would do this

game.Players.PlayerAdded:connect(function(plr) local nanaluk01 = game.Players:WaitForChild("Nanaluk01") if nanaluk01 ~= nil then

	-- do somethig
end

end)

This discussion is preserved as it was. New answers, comments, and votes are closed.