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

Can't find a Values name by leaderstats?

I am trying to do something like checkpoints. The problem is once i am trying to find the intvalue name with find first child it says that it is nil but once i check the explorer i can find that intvalue with that name.


script.Parent.Touched:Connect(function(hit)
		local character = hit.Parent
		local player = game.Players:GetPlayerFromCharacter(hit.Parent)
		local Stage = player.leaderstats.Stage
		if Stage.Value > 0 then
		local Check = game.ServerStorage.Values:FindFirstChild(Stage)
		print(Check)
		character:findFirstChild("LowerTorso").CFrame= CFrame.new(Vector3.new(-14, 1 + 27 * Check.Value, 19 - 56 * Stage.Value))
	end
end)

I hope you can help me thanks.

1 answer

Anyway i found the problem on line 6 i forgot to write Value

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