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

How would I move local parts with Filtering Enabled?

Asked by 9 years ago

Ok, I have created a model that I want to make a local model with FE, I just stuck the model in ReplicatedFirst(needs to be first) and then copied it with a local script and put it in workspace. I had a simple rotation script:

script.Parent.Parent.PrimaryPart=script.Parent
x=script.Parent.Parent

while wait(0.01) do
    x:SetPrimaryPartCFrame(script.Parent.CFrame*CFrame.Angles(0,0.005,0))
end

that worked just fine as a normal script when I had it on the server. I tried transferring the script to a local script but it doesn't seem to be rotating and it has no output. I even tried sticking a local script in the players scripts to try it but it didn't work either and had no output:

sign=game.Workspace:WaitForChild("Mini Miners")

while wait(0.01) do
    sign:SetPrimaryPartCFrame(script.Parent.CFrame*CFrame.Angles(0,0.005,0))
end

What exactly am I doing wrong here?

1 answer

Log in to vote
1
Answered by
Tigerism 220 Moderation Voter
9 years ago

Put the model in Server Storage. Create a server script and put it in ServerScriptService. Add a WaitForChild()so that the server knows when the model exists. Make the Server Script change the model in Workspace. Your problem is that the local script is trying to change Workspace, but that contradicts with the idea of FilteringEnabled, which basically blocks all client actions from replicating to other players.

You need to add a RemoteEvent or RemoteFunction. Basically, have the Local Script fire or invoke the function/event and the server script will rotate it.

0
Sorry to say but that's what I'm going for. I want to make a local script put parts on the workspace so that only the client will see them or change them. I have this giant rotating model in game that is mainly for decoration but if it lags (server client latency issue) it defeats it's perpose. I tried to get around this problem by forcing the model to be a local model and I want the client to ho BobserLuck 367 — 9y
0
...client to own it and rotate it itself to avoid the lag. BobserLuck 367 — 9y
0
I solved it. BobserLuck 367 — 9y
Ad

Answer this question