Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I replicate an object in workspace using a local script while filtering enabled is off?

Asked by
CjayPlyz 643 Moderation Voter
5 years ago

Replicate, as in to replicate the object in all clients, so that all clients can interact with the object.

I'm using this script in a local script :

local part = game:GetService("ReplicatedStorage").Part
local mouse = game.Players.LocalPlayer:GetMouse()

script.Parent.Activated:Connect(function()
    local target = mouse.Target
    if target then
        local clone = part:Clone()
        local targetsurface = mouse.TargetSurface
        clone.Position = target.Position + Vector3.FromNormalId(targetsurface)*4
        clone.Parent = workspace
    end
end)

It copies a part from replicated storage when the tool is activated then adjusts its position then set the parent to workspace.

The problem is that the object is a local part. It's probably because i'm using a local script, but I wan't to use a local script as much as possible as long as its working.

0
if you want all players to be able to see a part then you have to create it on the server. I would not recommend sending a request from the client to the server back to the client(not that that is what your doing...but...). ForeverBrown 356 — 5y
0
doing it without a remove event is impossible due to roblox security, filtering enabled will always be on even if u deactivate it Gameplayer365247v2 1055 — 5y
0
oh.. well CjayPlyz 643 — 5y
0
You CAN'T use a local script! oftenz 367 — 5y
0
Well it's completely bad practice for something as simple as this. oftenz 367 — 5y

Answer this question