ShopGui parents to Player Gui. But the shop is not actually shown
script.Parent.Triggered:Connect(function(player)
local gui = game.ServerStorage.ShopGui:Clone()
gui.Parent = player.PlayerGui
end)
ShopGui parents to Player Gui. But the shop is not actually shown
script.Parent.Triggered:Connect(function(player)
local gui = game.ServerStorage.ShopGui:Clone()
gui.Parent = player.PlayerGui
end)
Is ShopGui enabled true in properties?
Yes
Okay, then since ServerStorage is a service you should try and use
local gui = game:GetService("ServerStorage").ShopGui:Clone()
instead of just normally referring to it, and personally i’d use ReplicatedStorage rather than ServerStorage, incase you would want that just type in GetService(“ReplicatedStorage”)
If that didn’t work, I got a last idea but let me know if it worked!
That’s same thing as game.ServerStorage. Also tried ReplicatedStorage didn’t work as well
Throws this error now
Is there a reason you want to Clone the gui? Cuz you could also just leave it in StarterGui and enable it when the proximity prompt has been triggered
Tried your suggestion same error. Maybe I should not use proximity prompts
Uhh, only if you want to though you could try and give me a rbxl file, I think I could edit the error from there!
sus. Ill give you model tho
Like I said, you don’t have to, I just remember kinda having the same issue, it was about cloning the menugui into the player after it died since I am using custom models for my game. I gave someone the file and they fixed it. And I just gave the person what they needed, a simple ui n stuff not my actual game file containing all the stuff lol
Alrighty, I’ll see what I can do one moment
What exactly is the issue here? I can see the shopUI and the block gets cloned into the UI
Thats what I wanna know. Works with my other GUI’s but not that one
What are you trying to achieve then?
The shop is supposed to be visible to the player
It is by the button? But you want it from ProximityPrompt?
ProximityPrompt
So I made Like That:
-Deleted the TextButton,instead i added a close gui button.Because Gui Is Gonna Show From ProximityPrompt.
-The Close Button Script is:
script.Parent.MouseButton1Click:Connect(function(hit)
script.Parent.Parent.Parent.Parent.ShopGui:Destroy()
end)
–this is the close button script.
The Script i Put in ProximityPrompt is:
script.Parent.Triggered:Connect(function(plr)
local gui = game:GetService("ReplicatedStorage"):FindFirstChild("ShopGui")
local clone = gui:Clone()
clone.Parent = plr.PlayerGui
end)
Thats All.Put the Gui to the ReplicatedStorage and u finished.