#shopGUI not opening
104 messages · Page 1 of 1 (latest)
@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
** You are now Level 3! **
ccShopGui under ReplicatedStorage
Script under ServerScriptService
CCShop (frame) under ScreenGui
i assume the script above is in serverscriptservice under name the as "script"?
yes
ok well i think i see the problem
the parent of that script is serverscriptservice correct
even tried putting "Script" under the CCShop frame
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
CCShop is under ScreenGui
ccShopGui is a RemoteEvent under ReplicatedStorage
to properly define CCShop it would be game.StarterGui.ScreenGui.CCShop
I think I tried that... lemme check
lol
either it didn't work, or I didn't change it right
so is it working now or
let me see hwo you wrote it in the script
that's what I meant to upload... sorry. working on it
k
no script is referencing itsself
** You are now Level 5! **
lol
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
now it's not doing anything
game. then all the rest
so no error message?
✅
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
basically, I've got a circle on the ground. when stepped on, I need it to open a shop gui
ok well you need to access the ontouched event in the function
yeah
and say that when it's touched "do this"
y is this seperate from the first script
cause that's how the tutorial is doing it lol
yes
have you finished the tutorial
yes
ok. I'll look into chat gpt
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)```
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)
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```
💀 brb
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
** You are now Level 4! **
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.
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 💀
SOLVED
im new 💀
Yeah I know lol. I saw u just joined a day or so ago
no worries lol
👍