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

How do I make changes to the server from a localscript with filteringEnabled?

Asked by 7 years ago

What I'm trying to do here is create a system where a player can customize the colors on their car. Now, without filteringEnabled, it's fairly straightforward. I had it completed.

01function Car()
02--Variables
03    local Player = game.Players.LocalPlayer
04    local Character = Player.Character
05    local Evrythn = script.Parent.Parent.Parent.Parent.Parent.EVERYTHING
06    local camera = game.Workspace.Camera
07    local CarPack = game.Lighting:FindFirstChild(Player.Name.. "s_CarPack")
08    local Car = CarPack.Nissan
09    local CarClone = Car:Clone()
10    local primpart = CarClone.PrimaryPart
11--Move the car
12    CarClone.Parent = game.Workspace.CurrentCamera
13    CarClone:makeJoints()
14    CarClone:MoveTo(Vector3.new(1774.9, 7652.45, 28754.186))
15    CarClone.Name = (Player.Name.. "s_CustomCar")
View all 29 lines...

It places a car in the player's CurrentCamera, and allows them to see it while they customize their car. Then when they click another button, it runs this

01function SavePlayerCar()   
02    local CarToClone = game.Workspace.CurrentCamera:WaitForChild(plr.Name .. "s_CustomCar")
03    local CarClone = CarToClone:Clone()
04    local CarName = CarToClone.Car.CarName.Value
05    local CarPack = game.Lighting:WaitForChild(plr.Name.."s_CarPack")
06    --Save car to player's custom car pack
07    CarPack:WaitForChild(CarName):remove()
08    CarClone.Parent = CarPack
09    CarClone.Name = CarName
10end
11script.Parent.Save.MouseButton1Click:Connect(SavePlayerCar)

Which acts as a save button. Now all of this works Fine WITHOUT filteringEnabled; I know why it doesn't work with filteringEnabled, it's running from a localscript.

My question to you is: How do I get it to copy the car from the CLIENT and put it in something on the SERVER.

0
Trying using RemoteEvent MizeryGFX 15 — 7y
0
I did try that. I need to transfer a Model, not a command. doot_d0ot 5 — 7y
0
Basically what I'm asking is - "Can you transfer models from Client to Server with a localscript with filteringEnabled?" doot_d0ot 5 — 7y

Answer this question