How to get Wins Gui

Guys is there anyway to make this game :Climb 1,000 Stairs - Roblox Give you a win when you reach to the top any shop wins shop so 1 win lets say you can buy a trail.
If you know what I mean can you pls help me .

3 Likes

You can have a part that they can touch to get wins. Let’s call this part WinPart. You can use the Touched event to give the player a win like such:

WinPart.Touched:Connect(function (touchedPart)
	if touchedPart.Parent:FindFirstChild("Humanoid") then -- Check if it's a player
		local character = touchedPart.Parent
		local player = game:GetService("Players"):GetPlayerFromCharacter(character)
		-- from here, just give the player a win.
	end
end)
2 Likes

What if an NPC touched the WinPart? It should be checked together with the Humanoid. Also, use FindFirstChildOfClass() instead in case of name change of Humanoid.

WinPart.Touched:Connect(function(touchedPart)
	local player = game:GetService("Players"):GetPlayerFromCharacter(touchedPart.Parent)
	if touchedPart.Parent:FindFirstChildOfClass("Humanoid") and player then -- Check if it's a player
		local character = touchedPart.Parent
		-- from here, just give the player a win.
	end
end)
1 Like

DO i use script or what can you help pls

Normal Script inside the part which makes the player win

1 Like

Can you screenshot what’s inside the script?

1 Like

Change WinPart to script.Parent

Every WinPart? Or just first one

What do you mean? Can you screenshot it again but the entire script, including the line number

oh yeah, the first one. also you should change line 5 for it to work

not to be rude but, you should also learn to script so you don’t need to post simple questions. i suggest starting with youtube tutorials

alr but is this good

yes, dont forget to edit line 5 too

can you help me make a win gui

image


I am quiet new

it would be long if i actually wrote an entire tutorial for GUI, i recommend watching this

and reading this

1 Like

can you help me with above
Please