#My shop gui wont open
1 messages · Page 1 of 1 (latest)
Im a bit of a newbie so i cant say much but i think your first script is meant to be a local script instead of a server one
I have a local and a normal script
I gotta switch them?
Yh im pretty sure they are both meant to be local scripts
Ahh alr il try
Since they are both happening on the client only
Nope it does not work
Wdym
Where would i place the script at the npc or in the shopframe
When the prox is triggered connect a function that opens your gui
All that in one local script
No need for remote events
prox.Triggered:Connect(function()
script.Parent.shopframe.Visible = true
I deleted the remote event; where do I place the script
At the gui right?
I put this in the shopframe
Still doesnt work tho
show hierarchy
If u put it under the shopframe it doesnt know what prox is
Cause script.Parent is ur gui
wait check if your screengui is enabled
U would have to do prox = game.Workspace. ..... :FindFirstChild("ProximityPrompt") or sum like that
Wdym
where shopframe is the children
check the parent screengui
show the the hierarchy for your shop thing
the shop gui
It is
wheres the ls at
well
** You are now Level 2! **
does it work
** You are now Level 1! **
ahh
Imma rescript it all and imma lyk
alright
Brooo it still dont work
What
alright send me
local RemoteEvent = game.ReplicatedStorage:WaitForChild("Opengui")
RemoteEvent.OnClientEvent:Connect(function()
script.Parent.Frame.Visible = true
end)
is that in serverscript service
this is placed in the starter gui frame
and you dont need a remote to open a gui
is the script supposed to open a gui when a prox is triggered?
alright so go into your stater gui
and i have a npc with proximity prompt and this script local RemoteEvent = game.ReplicatedStorage:WaitForChild("Opengui")
local prox = script.Parent.ProximityPrompt
prox.Triggered:Connect(function(player)
RemoteEvent:FireClient(player)
end)
alr
add a local script
in the gui or just starter gui
yeah
alr
then add this
** You are now Level 2! **
local prox = workspace.Part.ProximityPrompt
local sg = script.Parent
local frame = sg:WaitForChild("Frame")
prox.Triggered:Connect(function()
frame.Visible = true
end)
soemthing liek this
prox is variable for where your actual proximityprompt is
so probably in your rig
sg you rscreen gui
frame the frame
the function is self explan
okay i added in the script
make sure to adjust the variables
local prox = workspace.buy.ProximityPrompt
local sg = script.Parent
local frame = sg:WaitForChild("Frame")
prox.Triggered:Connect(function()
frame.Visible = true
end)
alright see if it works
nope
** You are now Level 3! **
if u want you can invite me to studio if it doesnt work and ill fix it
yeahh sure
add me
whats your user
silencingion
yeahh
yoooo whattt
so fast
www
can you expalin it to me i also gotta make the sell work
alr
so heres the script
local prox = workspace.buy:WaitForChild("ProximityPrompt")
local sg = script.Parent
local frame = sg:WaitForChild("shopframe")
local close = frame:WaitForChild("close TextButton")
prox.Triggered:Connect(function()
frame.Visible = true
end)
close.Activated:Connect(function()
frame.Visible = false
end)
i placed it in a local script because uis are normally client side
ill tyep it in comments in the script
itll save there
ahh allrr thanks bro your a legend
this makes sense tho
i been trying for 2 houres now
hahaha dont worry
www bro
imma be taking som lessons again i was scripting 4 years ago but on unity and forgot bassicly almost everything but i just started again for fun
theres not much worry anyway sometimes you just overcomplicate things on instinct
add the sell frame one
i wanna see if u can do it
yeahh thanks alot tho
alrr
yo bro
the text is there it just doesnt show
let me see
well you found it out
** You are now Level 3! **
im not ver y good with guis ahaha
alrigh tlet me see
Yess i was about to say
ther eyou go
It doesnt have a close function
Yeahhhh
Yes ill add that tommorow
Thanks g
Adding the close speaks for itself
alr all good dw about ti
cant put local script in workspace