Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can i make a shop gui without using a remote event for every single purchase?

i don't know how to do this :(

1 answer

Short Answer: No. You have to use a Remote Event in order to replicate everything to the server (for example, putting an item onto the player's backpack.) Long Answer: Still no, but you can use one event and put a string or bool or number in order to do something.

Local Script

local remoteEvent = game.ReplicatedStorage.RemoteEvent

remoteEvent:FireServer(BrickColor.new("Really red")) --Let's just say I wanna pass the brickcolor.

Server Script

local remoteEvent = game.ReplicatedStorage.RemoteEvent
local handle = game.StarterPack.Tool.Handle --Let's just say I wanna make a part red.

remoteEvent.OnServerEvent:Connect(function(player, brick) --1st parameter is always the player, 2nd is the brick we have put on the FireServer()
	handle.BrickColor = brick
end)

1 comment

0

StarterPack is a replication container, the actual Tool Instance is stored in the Player's Backpack or Character rig if equipped.

This discussion is preserved as it was. New answers, comments, and votes are closed.