#shopGUI not opening

104 messages · Page 1 of 1 (latest)

tranquil basinBOT
#

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

brave anvil
#

@swift grove

swift grove
#

can you send a screenshot of where frame is on the workspace so I can see if what the error message means

#

starting from the script as you used it to access frame

brave anvil
tranquil basinBOT
#

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

brave anvil
#

ccShopGui under ReplicatedStorage
Script under ServerScriptService
CCShop (frame) under ScreenGui

swift grove
#

i assume the script above is in serverscriptservice under name the as "script"?

brave anvil
#

yes

swift grove
#

ok well i think i see the problem

#

the parent of that script is serverscriptservice correct

brave anvil
#

even tried putting "Script" under the CCShop frame

swift grove
#

frame is not a valid member of serverscriptservice

#

when you did script.Parent you accessed the serverscriptservice

#

when you put .frame that says "frame is the child of serverscriptservice" which it isnt

#

and which frame are you trying to access

#

The menu frame or the rebirth frame

brave anvil
#

needing the Script to run with the CCShop frame

swift grove
#

i see ccshopgui but i dont see ccshop

#

can you ss where ccshop is

brave anvil
#

CCShop is under ScreenGui

swift grove
#

Ok well thats CCShop not CCShopgui

#

wait im dumb

#

i see it

#

ok

brave anvil
#

ccShopGui is a RemoteEvent under ReplicatedStorage

swift grove
#

to properly define CCShop it would be game.StarterGui.ScreenGui.CCShop

brave anvil
#

I think I tried that... lemme check

#

lol

#

either it didn't work, or I didn't change it right

swift grove
#

so is it working now or

brave anvil
swift grove
#

let me see hwo you wrote it in the script

brave anvil
#

that's what I meant to upload... sorry. working on it

swift grove
#

k

brave anvil
swift grove
#

dont say script

#

those things are not a member of the script

brave anvil
#

script is telling the thing to run the script

#

right?

swift grove
#

no script is referencing itsself

tranquil basinBOT
#

studio** You are now Level 5! **studio

swift grove
#

LETS GOOO

#

rank up

#

anyways

brave anvil
#

lol

swift grove
#

uhhh

#

you would use script if you have something as a child under it

#

or if you're trying to access something thats a parent of script

#

like if you wanted to access serverscriptservice you would do script.parent

brave anvil
#

now it's not doing anything

swift grove
#

game. then all the rest

brave anvil
#

it's not doing anything

swift grove
#

hmmmmmmm

#

does it still give you the same error message when you type that?

brave anvil
#

it doesn't give me anything at all.

#

no error or anything and doens't work

swift grove
#

so no error message?

brave anvil
#

swift grove
#

ok well i thin thats a step in the right direction

#

what are you trying to do again lol

#

this is a long convo mb

brave anvil
#

basically, I've got a circle on the ground. when stepped on, I need it to open a shop gui

swift grove
#

ok well you need to access the ontouched event in the function

brave anvil
#

yeah

swift grove
#

and say that when it's touched "do this"

brave anvil
#

that's in Script

swift grove
brave anvil
#

cause that's how the tutorial is doing it lol

swift grove
#

💀

#

does the tutorial work in the end

brave anvil
#

yes

swift grove
#

have you finished the tutorial

brave anvil
#

yes

swift grove
#

ngl this is usually where i use chat gpt 🗿

#

ima brb for no reason in particular

brave anvil
#

ok. I'll look into chat gpt

swift grove
#

dw i got it

#

can you copy the script i dont want to have to type it lol

brave anvil
#

game.Workspace.Shop.shopGUI.Touched:Connect(function(hit)
    if not debounce then
        debounce = true
    if game.Players:GetPlayerFromCharacter(hit.Parent) then
        game.ReplicatedStorage.ccShopGui:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
        end
    end
    
end)```
swift grove
#

try this local debounce = false

game.Workspace.Shop.shopGUI.MouseButton1Click:Connect(function()
if not debounce then
debounce = true
if game.ReplicatedStorage:FindFirstChild("ccShopGui") then
game.ReplicatedStorage.ccShopGui:FireClient(game.Players.LocalPlayer)
else
print("ccShopGui function not found in ReplicatedStorage")
end
debounce = false
end
end)

brave anvil
#

Error:

  20:33:05.305  MouseButton1Click is not a valid member of Part "Workspace.Shop.shopGUI"  -  Server - Script:3
  20:33:05.305  Stack Begin  -  Studio
  20:33:05.306  Script 'ServerScriptService.Script', Line 3  -  Studio - Script:3
  20:33:05.306  Stack End  -  Studio```
swift grove
#

💀 brb

brave anvil
#

a mouse click isn't supposed to trigger this event

#

stepping on the part is supposed to trigger it

#

So, I'm going to change MouseButton1Click to Touched

tranquil basinBOT
#

studio** You are now Level 4! **studio

brave anvil
#

After the above change, now I get Error:

  20:35:57.442  FireClient: player argument must be a Player object  -  Server - Script:7
  20:35:57.442  Stack Begin  -  Studio
  20:35:57.442  Script 'ServerScriptService.Script', Line 7  -  Studio - Script:7
  20:35:57.442  Stack End  -  Studio```
#

Ok. I made progress.

swift grove
#

idk man

#

good good 💀

brave anvil
#

now it's returning the error where you put

    print("ccShopGui function not found in ReplicatedStorage")```
#

it printed that into the console

#

here's the changes I made

#
local player = game:GetService("Players").LocalPlayer

game.Workspace.Shop.shopGUI.Touched:Connect(function(hit)
    if not debounce then
        debounce = true
        if hit.parent == player then
            game.ReplicatedStorage.ccShopGui:FireClient(player)
        else
            print("ccShopGui function not found in ReplicatedStorage")
        end
        debounce = false
    end
end)```
#

all these experienced coders in here and none to be found to help us little guys 💀

brave anvil
#

SOLVED

brave anvil
#

no worries lol

swift grove
#

👍