#Model or tool activating gui
19 messages · Page 1 of 1 (latest)
when ingame u dont put the gui inside the startergui
each player has a folder called PlayerGui you put it there
so like (for when you touch a model)
on touch connect function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if plr then
--lets say that the gui is inside the script
local clonedGui = script.Gui:Clone()
clonedGui.Parent = plr:FindFirstChild("PlayerGui")
else
print("couldn't find player if u get this tell me otherwise delete the whole else and this print")
end
end
took a while to type out cuz rn im on my phone 💀
@worldly bough
this is overcomplicated 😅
you can just have the gui already there and enable/disable it
no need for the clone shenanigans
Ive read this a few times
tried a few ways of typing this
and it just doesnt make much sense to me
i am confused
got it
my bad in my situation 3 days ago i had to cuz it was changing dynamically 💀
same code as the one i sent only that in the if plr you put plr:FindFirstChild("PlayerGui"):FindFirstChild("Gui").Enabled = true
Ok so I made a couple tweaks
** You are now Level 7! **
and its working