#My shop gui wont open

1 messages · Page 1 of 1 (latest)

cunning tendon
subtle hollow
#

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

cunning tendon
#

I gotta switch them?

subtle hollow
cunning tendon
#

Ahh alr il try

subtle hollow
#

Since they are both happening on the client only

cunning tendon
subtle hollow
#

Oh hang on

#

I think it should all be in one script

cunning tendon
#

Wdym

subtle hollow
#

Local script

#

U dont need to launch a remote event

cunning tendon
#

Where would i place the script at the npc or in the shopframe

subtle hollow
#

When the prox is triggered connect a function that opens your gui

#

All that in one local script

#

No need for remote events

cunning tendon
#

Ahhhh

#

Alr ill try

subtle hollow
#

prox.Triggered:Connect(function()
script.Parent.shopframe.Visible = true

cunning tendon
#

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

queen elm
#

show hierarchy

subtle hollow
#

If u put it under the shopframe it doesnt know what prox is

#

Cause script.Parent is ur gui

queen elm
#

wait check if your screengui is enabled

subtle hollow
#

U would have to do prox = game.Workspace. ..... :FindFirstChild("ProximityPrompt") or sum like that

cunning tendon
queen elm
#

where shopframe is the children

#

check the parent screengui

#

show the the hierarchy for your shop thing

#

the shop gui

cunning tendon
queen elm
#

check if blobframe is enabled

#

and where is the local script at

cunning tendon
#

It is

queen elm
#

wheres the ls at

cunning tendon
#

Inside the shopframe

queen elm
#

well

toxic gyroBOT
#

studio** You are now Level 2! **studio

queen elm
#

thats a provlem

#

actually

#

send the locla script

cunning tendon
#

YOOO

#

I think i got it

queen elm
#

does it work

toxic gyroBOT
#

studio** You are now Level 1! **studio

cunning tendon
#

Shopframe it self wasnt ctibe

#

Active

#

Dammit

#

Now i gotta do it like i had

queen elm
#

ahh

cunning tendon
#

Imma rescript it all and imma lyk

queen elm
#

alright

cunning tendon
#

Brooo it still dont work

queen elm
#

send me

#

i think i have a general idea

cunning tendon
#

What

queen elm
#

send me the script

#

i think its the location

cunning tendon
#

The local script

#

Wait imma pullup doscord on my laptop rq

queen elm
#

alright send me

cunning tendon
#

local RemoteEvent = game.ReplicatedStorage:WaitForChild("Opengui")

RemoteEvent.OnClientEvent:Connect(function()
script.Parent.Frame.Visible = true
end)

queen elm
#

is that in serverscript service

cunning tendon
#

this is placed in the starter gui frame

queen elm
#

and you dont need a remote to open a gui

#

is the script supposed to open a gui when a prox is triggered?

cunning tendon
#

yh

#

but without a remote is good but idk how to script that

queen elm
#

alright so go into your stater gui

cunning tendon
#

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)

cunning tendon
queen elm
#

add a local script

cunning tendon
#

in the gui or just starter gui

queen elm
#

in the screen gui

#

where your shop thign is in

cunning tendon
#

alrr

#

do i delete my old scripts and remote etc?

queen elm
#

yeah

cunning tendon
#

alr

queen elm
#

then add this

toxic gyroBOT
#

studio** You are now Level 2! **studio

queen elm
#

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

cunning tendon
#

okay i added in the script

queen elm
#

make sure to adjust the variables

cunning tendon
#

wich ones

#

oh nvm i see it

#

okay ive done that

queen elm
#

alright send me the script now

#

let me see

cunning tendon
#

local prox = workspace.buy.ProximityPrompt
local sg = script.Parent
local frame = sg:WaitForChild("Frame")

prox.Triggered:Connect(function()
frame.Visible = true
end)

queen elm
#

alright see if it works

cunning tendon
#

nope

toxic gyroBOT
#

studio** You are now Level 3! **studio

queen elm
#

if u want you can invite me to studio if it doesnt work and ill fix it

cunning tendon
#

yeahh sure

queen elm
#

add me

cunning tendon
#

whats your user

queen elm
#

silencingion

cunning tendon
#

im not really good at scripting anymore

#

i added you

queen elm
#

you need to add me on roblox

#

then into studio

#

so i can edit it

cunning tendon
#

ohh alr

#

i added you

queen elm
#

alr

#

add me into studio now

cunning tendon
#

done

#

thanks alot bro

queen elm
#

grow a blob?

#

alr im in

cunning tendon
#

yeahh

queen elm
#

it works now

#

added the close button functionality aswell

cunning tendon
#

yoooo whattt

#

so fast

#

www

#

can you expalin it to me i also gotta make the sell work

queen elm
#

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

cunning tendon
#

ahh allrr thanks bro your a legend

#

this makes sense tho

#

i been trying for 2 houres now

queen elm
#

hahaha dont worry

cunning tendon
#

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

queen elm
#

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

cunning tendon
#

alrr

#

yo bro

#

the text is there it just doesnt show

queen elm
#

let me see

cunning tendon
#

Got it

#

Dang

queen elm
#

well you found it out

toxic gyroBOT
#

studio** You are now Level 3! **studio

queen elm
#

im not ver y good with guis ahaha

cunning tendon
#

Lmao

#

Ty

#

Oh damm it doesnt work

queen elm
#

alrigh tlet me see

cunning tendon
#

Yess i was about to say

queen elm
#

ther eyou go

cunning tendon
#

It doesnt have a close function

queen elm
#

yeah

#

it should be the nevermid butto

cunning tendon
#

Yeahhhh

cunning tendon
#

Thanks g

#

Adding the close speaks for itself

queen elm
#

alr all good dw about ti

earnest kestrel