http://i.imgur.com/bM41C0Q.jpg
look at the output
i am trying to modify the dummy using local scripts, but the items in replicated storage wont replicate because im using fe
any help is appreciated :)
You will need to setup Remote(s) in order to replicate the desired objects.
You haven't given much context on what you need to replicate exactly, so i'll give an example using a simple Part object.
First, you need to set up your Remote. This can either be a RemoteEvent or a RemoteFunction.
What's the difference?
Essentially, you use a RemoteFunction if your code depends on this remote firing(i.e. the rest of the localscript cannot go on without this replication process finishing). Otherwise, you're good to go with a RemoteEvent.
For this example a RemoteEvent will suffice.
Place a RemoteEvent in ReplicatedStorage. Place a Script inside of Workspace. This script will control any server-sided code. The OnServerEvent
event will fire whenever the FireServer
function is called from a localscript.
Note: The 'client' argument is always passed first.
game.ReplicatedStorage.RemoteEvent.OnServerEvent:connect(function(client) local p = Instance.new("Part",workspace); --Part created on the server p.Anchored = true; p.Size = Vector3.new(5,5,5); p.CFrame = CFrame.new(0,10,0); p.BrickColor = BrickColor.new("Really red"); p.Transparency = .5; p.TopSurface,p.BottomSurface = "Smooth","Smooth"; end)
Second, you need to connect your Remote. This can be done, as stated before, by simply calling the FireServer
function on the RemoteEvent from your LocalScript.
local createPart = game.ReplicatedStorage.RemoteEvent; --The Remote wait(5) createPart:FireServer(); --Call it