Hello, fellow reader thank you for stopping to read this post I am really confused why I am getting this error message when the BMarket is in the workspace?? is there something wrong with the code or the type of script I used??? The script is a local script
------The code------
local proximity = workspace.BMarket.Prompt
local ProximityPromptService = game:GetService(“ProximityPromptService”)
proximity.Triggered:Connect(function()
local GUI = script.Parent:WaitForChild(“BlackMarketUI”)
GUI.Enabled = not GUI.Enabled
end)
local GUI = script.Parent:WaitForChild(“BlackMarketUI”)
GUI.Frame.TextButton.Activated:Connect(function()
GUI.Enabled = not GUI.Enabled
end)
Is the object in workspace called exactly “BMarket”? If so than try adding a :WaitForChild(“BMarket”)
3 Likes
I agree, since that’s basically what I was going to say.
1 Like
Thx for the help yall I’m pretty new to scripting so that’s why I did not know that lol thankyou!
c4strxz
(c4strxz)
June 14, 2022, 7:34pm
5
"Something" is not a valid member of "Parent" is an error that means that object is not parented to where you’re searching him from.
Let’s say my Part is parented to ServerStorage, If I call it from workspace.Part it will throw this error.
If you want BMarket to be in Workspace then do:
BMarket.Parent = workspace
In the nicest way possible, that was kind of useless to this situation.
1 Like