#Model or tool activating gui

19 messages · Page 1 of 1 (latest)

worldly bough
#

How can I make it so when you touch a model or pick up a tool it enables a gui?

dusk elk
#

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

twilit plover
#

you can just have the gui already there and enable/disable it

#

no need for the clone shenanigans

worldly bough
#

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

worldly bough
#

got it

dusk elk
dusk elk
worldly bough
#

Ok so I made a couple tweaks

vestal hingeBOT
#

studio** You are now Level 7! **studio

worldly bough
#

and its working