I created a shop gui that can load a shop per ShopID but now i have to set the shop id. To do this i created a part with a touch function but i dont know how i should set the shop id server sided

Path to to the Shop id Value: Game.Players.Localplayer.PlayerGui.ShopGui.ShopID

What i already did:

script.Parent.Hitbox1.Touched:Connect(function(Hit)
	if Hit.Name ~= "Baseplate" then
		local PlayerName = Hit.Parent.Name
		local Player =  game.Players:FindFirstChild(PlayerName)
		local ShopID = script.Parent.Parent.ShopID.Value
		if Player then
			--Part i dont know
		end
	end
end)

5 comments

0

Are you trying to make a Gui pop up when touching a part?

0

I'm trying to tell the gui which shop it should load

0

How does your question relate to your title..

0

The server should tell the GUI which shop to use