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 .
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)
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)
DO i use script or what can you help pls
Normal Script inside the part which makes the player win
Can you screenshot whatβs inside the script?
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
yes, dont forget to edit line 5 too
can you help me make a win gui
it would be long if i actually wrote an entire tutorial for GUI, i recommend watching this
and reading this
can you help me with above
Please