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

Trying to make certain parts local but the script is not creating the LocalBin?

Asked by
tjtorin 172
5 years ago

I am trying to make a script that creates a LocalBin in workspace and I am doing that using a camera object but when the script runs it does nothing.

tycoons = workspace.Tycoons:GetChildren()

game.Players.PlayerAdded:Connect(function(player)
    -- Reduce ore lag --
    local container = workspace:FindFirstChild("LocalBin")
    if not container then
        container = Instance.new("Camera")
        container.Name = "LocalBin"
        container.Parent = workspace
        print(workspace:FindFirstChild(container)) -- prints nil?
    end
     . . .
end)

1 answer

Log in to vote
1
Answered by 5 years ago

You seem to be confused on how Filtering works. What you're attempting to do is use the Camera exploit to localize Instances. This was common method for localizing Instances back in the day, but now should not be used. This method worked due to a replication flaw in how the local Camera was handled, and should always be executed via a localscript (Most likely where your issue lies). But due to the introduction of Filtering Enabled (FE) this method is now obsolete as any changes made by client sided code remain to the client. This all being said I highly recommend you read up on FE.

Ad

Answer this question