PLease fix my script

This is for a obby checkpoint and it prints 1 but doesnt print yas

script.Parent.Touched:Connect(function(Part)

local Player = game.Players:GetPlayerFromCharacter(Part.Parent)
local Value = Player.leaderstats.Stage.Value

if Player then
	if Value == 1 then
		print("Yas")
	end
	print(Player.leaderstats.Stage.Value)
	--Player.leaderstats.Stage.Value = tonumber(script.Parent.Parent.Name)
	script.Parent.Star.Size = NumberSequence.new{NumberSequenceKeypoint.new(0, 0.5), NumberSequenceKeypoint.new(1, 0.5)}
	wait(0.5)
	script.Parent.Star.Size = NumberSequence.new{NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 0)}
end

end)

is the value in Stage stored as integer or as a string? try

if Value == "1" then
    print("Yas") 
end

Is the value less than 1 or more than 1?

Your scripts wrong. Why do you reference the Part variable outside the scope?

As doubles are passed by value instead of reference instead of creaitng a variable Value create a Stage variable referencing to Player.leaderstats.Stages then do Stage.Value.

One immediate problem I’m noticing is that you’re declaring the player’s “value” variable before you check to make sure that the player even exists