Hey, I am making speed simulator game. Can someone help me?

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		wait(.5)
		local Humanoid = character:WaitForChild("Humanoid")
		
		Humanoid.Running:Connect(function(speed)
				local leaderstats = player:FindFirstChild("leaderstats")
				local WalkSpeed = player:FindFirstChild("Confings"):FindFirstChild("WalkSpeed")
				
				wait(1)
				if speed > 0 then
				leaderstats:WaitForChild("Steps").Value = leaderstats:WaitForChild("Steps").Value +1
				WalkSpeed.Value = WalkSpeed.Value +0.1
			end
		end)
	end)
end)

23:18:49.739 - ServerScriptService.PlayerSettings:38: attempt to index a nil value 23:18:49.740 - Stack Begin 23:18:49.740 - Script 'ServerScriptService.PlayerSettings', Line 38 23:18:49.741 - Stack End

5 comments

0

Where is line 38? Post full code if you want help.

0

its the full coded.

0

I think what the other person is trying to say is that he can't find line 38. My guess is that you omitted some lines so we can't say which line is line 38. Or maybe it's referring to another file.

0

If I had to guess which line is 38, I'd say it's either line 9 or 10 here. Can't tell exactly where your problem is, at least type --problem here or --line 38..

0

I'm not going to try guessing.. Give us the full code.