I was making a script so a shop gui could show up, but, the script i'm using isn't working, even though I was going to put the gui out of view and use this script so the player could use it. How come the script doesn't work? This is in a Regular script (not local).

script.Parent.Parent.DialogChoiceSelected:Connect(function(player,Choice)
	if Choice.Name == "Buy" then
local gui = game.StarterGui.ShopGui
gui.Frame.Position = UDim2.new(0, 35, 0, 68)
gui.Frame.AnchorPoint = Vector2.new(1, 1)
	end
	end)

4 comments

0

You're changing the StarterGui, not the player's GUI. You need to use player.PlayerGui.ShopGui instead of game.StarterGui.ShopGui or it won't work.

0

The DialogChoiceSelected requires to be used on the Client side aka Local Script

0

oh! Thank you both

0

It did help, but it still didn't work