I need help On a Proximity Prompt Bug

For some reason when trying to access the same Gui again it doesn’t show up

OpenShop.TriggerEnded:Connect(function(Player)
	if Player.OwnsAPlot.Value == true and Player.PlotObject.Value ~= nil and not Player.PlayerGui:FindFirstChild("ShopGui") then
		local Shop = script.Parent.Parent.ShopGui:Clone()
		Shop.Parent = Player.PlayerGui
	elseif Player.PlayerGui:FindFirstChild("ShopGui") then
		print("Player has Gui")
	end
end)

heres a video

heres the output

any help is appreciated

Im not sure why you are cloning the ShopGui into the players PlayerGui when you could place it in the players ScreenGui and access the ShopGui from Player.PlayerGui.ShopGui.

Also im assuming the ShopGui is being deleted when the ‘Buy’ Button is being clicked. Im not too sure why this is happening but try doing what I said in the first paragraph if you can. Also try debugging with print(), and you have aw typed into the output for some reason

1 Like

Omg I didnt see the aw in the output😭I will try this out soon

here’s my new script and it still isn’t working

OpenShop.TriggerEnded:Connect(function(Player)
	if Player.OwnsAPlot.Value == true and Player.PlotObject.Value ~= nil and Player.PlayerGui:FindFirstChild("ShopGui").Enabled == false then
		local Shop = Player.PlayerGui:FindFirstChild("ShopGui")
		repeat
			Shop.Enabled = true
		until Shop.Enabled == true
	end
end)

I am setting the gui enabled to false when bought btw

nevermind I got it all I had to do was change the enabling off in a serverscript instead thx for the hellp!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.