Touch part for GUI (Solved)

what do you exactly mean by that

local Popup = script.Parent.ScreenGui
local Ready = false
function onTouch(hit)
if not hit.Parent:FindFirstChild("Humanoid") then return end
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr.leaderstats.Stage.Value < tonumber(script.Parent.Name) then
local c = Pop:Clone()
c.Parent = plr.PlayerGui
wait(3)
c:Destroy()
end
end

U think that will work? Ima try I can believe u, ur the only one who is helping me, and not giving up on me

inside the player is there a value for his checkpoints? aka leaderstats that has player’s checkpoint in it.

Yes, hold up I can show you a script of the leaderstats if thats what u mean?

like inside the leaderstats is there a bunch of values or only 1 value?

Also isn’t it

local Popup = script.Parent.ScreenGui
local Ready = false
function onTouch(hit)
if not hit.Parent:FindFirstChild(“Humanoid”) then return end
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr.checkpoints.Value == tonumber(script.Parent.Name) then
local c = Popup:Clone()
c.Parent = plr.PlayerGui
wait(3)
c:Destroy()
end
end

it was saying pop but it was an unknown global so I changed it into popup

oohh uhm there is only 1 value

alr, try my script above now. limits

Omg it actually does work… TYSMM!!!

1 Like

ofc, feel free to ask anything!

does the gui pop up for 2 players or only one?

it will pop up only for the player who’s going to touch the part

ur the best btw like thank you so much

1 Like

Thats great!!! Thank you so much, you’re the best!

1 Like

Ima follow you on roblox like ur the best

1 Like

hold up one thing, when I went with one of my players on the part it showed for player1 but not for player2

make sure that that player2 hasn’t already passed that stage.

it hadn’t passed the stage idk why it doesn’t work, maybe i can invite u to the game to show u what I mean

like when you touched the part with player1 it showed up, and then touched the part again for player2 it didnt show up?