does anyone know the remote client without making a new instace as a script i made a part variable like
view source
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
little bit of a heads up; making a part in a local script cant necessarily be done like that. you have to FireServer in order to do that function, like this:
localscript:
local rep = game:GetService("ReplicatedStorage") local fireevent = rep:WaitForChild("FireStarter") local function somefunction() local parttype = "Part" local color = Color3.fromRGB(38, 190, 174) local size = Vector3.new(1, 1, 1) local material = 'Grass' fireevent:FireServer(parttype, color, size, material) end
server script:
local rep = game:GetService("ReplicatedStorage") local fireevent = Instance.new("RemoteEvent", rep) fireevent.Name = "FireStarter" local function letsago(parttype, color, size, material) local p = Instance.new(parttype) p.Color = color p.Size = size p.Material = material end fireevent.OnClientEvent:Connect(letsago)
hopefully this helps!