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

Making Parts with FireServer?

does anyone know the remote client without making a new instace as a script i made a part variable like

local nou = Instance.new("Part")

then i want it to go with the fireserver how do i do that to make it so everyone would see it WITHOUT doing the create part w/ remote event i want the variable itself to go with the fireserver in remote event. i know,

local rep = game:GetService("ReplicatedStorage")
local fireevent = rep.FireStarter

but i want to make it into so its easier without rewriting code

1 answer

Listen for the OnServerEvent on a Script:

-- LocalScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEventName")

remoteEvent:FireServer()
-- Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEventName")

remoteEvent.OnServerEvent:Connect(function()
	local newPart = Instance.new("Part")
	newPart.Parent = workspace
end)

Hope this helps! :)

2 comments

0

Thanks ill try then mark it as answered

0

for local script. what do i do with the brackets insidde

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