of     2   
chevron_rightchevron_rightchevron_right

doot_d0ot
#223393697Wednesday, August 09, 2017 8:16 PM GMT

So I'm converting a game to filteringEnabled, and I'm using a RemoteFunction to cross the 'boundary', but it's not working. Can anyone tell me why? --Local Script function SavePlayerCar() local CarToClone = game.Workspace:WaitForChild(plr.Name .. "s_CustomCar") local CarClone = CarToClone:Clone() local CarName = CarToClone.Car.CarName.Value local CarPack = game.Lighting:WaitForChild(plr.Name.."s_CarPack") --Save car to player's custom car pack CarPack:WaitForChild(CarName):remove() CarClone.Parent = CarPack CarClone.Name = CarName game.Workspace.Events.CarSaver:InvokeServer(CarClone) end script.Parent.Save.MouseButton1Click:Connect(SavePlayerCar) --Server Script function game.Workspace.Events.CarSaver.OnServerInvoke(Player, CarClone) print(CarClone.Name) end And it's saying that CarClone is a Nil Value in the server script.
doot_d0ot
#223394238Wednesday, August 09, 2017 8:26 PM GMT

bump1
LaeMVP
#223394423Wednesday, August 09, 2017 8:29 PM GMT

Destroy not remove
doot_d0ot
#223394590Wednesday, August 09, 2017 8:32 PM GMT

That's not what I asked.
caca50
#223394676Wednesday, August 09, 2017 8:34 PM GMT

Put the remote function in replicated storage Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
doot_d0ot
#223394683Wednesday, August 09, 2017 8:34 PM GMT

Replacing 'remove()' with 'Destroy()' won't do anything for what I'm asking.
doot_d0ot
#223394912Wednesday, August 09, 2017 8:38 PM GMT

and caca50, that didn't work.
caca50
#223395207Wednesday, August 09, 2017 8:44 PM GMT

I can see you're using a lot of things that are not recommended anymore. As already mentioned, use :Destroy(), not :remove() Use ReplicatedStorage for housing instances that should be used by both the server and the client. Use ServerStorage for storage for the server, not Lighting. Lighting should only deal with skies, visual effects, etc. Use ServerScriptService to house server scripts, workspace will also work for this. A LocalScript will only run Lua code if it is a descendant of one of the following objects: A Player's Backpack, such ## # ##### of a Tool A Player's Character model A Player's PlayerGui A Player's PlayerScripts The ReplicatedFirst service Make sure your local script abides by those rules^ After you fix those issues, post back here if the problem persists. Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
caca50
#223395265Wednesday, August 09, 2017 8:45 PM GMT

I can see you're using a lot of things that are not recommended anymore. As already mentioned, use :Destroy(), not :remove() Use ReplicatedStorage for housing instances that should be used by both the server and the client. Use ServerStorage for storage for the server, not Lighting. Lighting should only deal with skies, visual effects, etc. Use ServerScriptService to house server scripts, workspace will also work for this. A LocalScript will only run Lua code if it is a descendant of one of the following objects: A Player's Backpack, such as a descendant of a Tool A Player's Character model A Player's PlayerGui A Player's PlayerScripts The ReplicatedFirst service Make sure your local script abides by those rules^ After you fix those issues, post back here if the problem persists. Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
doot_d0ot
#223402337Wednesday, August 09, 2017 10:49 PM GMT

So I adjusted for things that needed to be adjusted that you listed, yet it still doesn't work. --Local Script, in the player's GUI function SavePlayerCar() local CarToClone = game.Workspace:WaitForChild(plr.Name .. "s_CustomCar") local CarClone = CarToClone:Clone() local CarName = CarToClone.Car.CarName.Value local CarPack = game.ReplicatedStorage:WaitForChild(plr.Name.."s_CarPack") --Save car to player's custom car pack CarPack:WaitForChild(CarName):Destroy() CarClone.Parent = CarPack CarClone.Name = CarName game.ReplicatedStorage.Events.CarSaver:InvokeServer(CarClone) end script.Parent.Save.MouseButton1Click:Connect(SavePlayerCar) --Server Script, in ServerScriptService function game.ReplicatedStorage.Events.CarSaver.OnServerInvoke(Player, CarClone) print(CarClone.Name) end And it's still saying that CarClone is a nil value.
AggressiveCatch
#223402411Wednesday, August 09, 2017 10:50 PM GMT

print CarClone.Name on the client and tell me if the name prints
doot_d0ot
#223402532Wednesday, August 09, 2017 10:53 PM GMT

Yep, it printed fine on the client.
doot_d0ot
#223403647Wednesday, August 09, 2017 11:15 PM GMT

bump
AggressiveCatch
#223404042Wednesday, August 09, 2017 11:22 PM GMT

idk dude
doot_d0ot
#223404369Wednesday, August 09, 2017 11:28 PM GMT

Anyone else have an idea?
caca50
#223404617Wednesday, August 09, 2017 11:32 PM GMT

"CarClone.Parent = CarPack" Is CarPack nil? Any other errors? Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
doot_d0ot
#223405143Wednesday, August 09, 2017 11:43 PM GMT

Nope, the only error is that CarClone is nil.
doot_d0ot
#223405188Wednesday, August 09, 2017 11:44 PM GMT

And it's an error on the Server script.
caca50
#223405252Wednesday, August 09, 2017 11:46 PM GMT

"local CarToClone = game.Workspace:WaitForChild(plr.Name .. "s_CustomCar")" How exactly is CarToClone being instantiated? If it's being created on the client, then that's your problem Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
peacefiltyler101
#223405319Wednesday, August 09, 2017 11:47 PM GMT

i love ur siggy
doot_d0ot
#223407841Thursday, August 10, 2017 12:40 AM GMT

All of this is taking place on the Client's workspace, and I'm trying to copy a car that only exists for the client and replicate it so the server into a custom bin for the player to use later.
caca50
#223408684Thursday, August 10, 2017 12:56 AM GMT

Create the car in the server Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
doot_d0ot
#223409601Thursday, August 10, 2017 1:14 AM GMT

But I only want 1 player to see it; the player who spawned it. In this case, they are customizing their car, not spawning it to be driven. I have the system for spawning a car for driving done.
doot_d0ot
#223412335Thursday, August 10, 2017 2:07 AM GMT

bump
doot_d0ot
#223418059Thursday, August 10, 2017 4:23 AM GMT

bump

    of     2   
chevron_rightchevron_rightchevron_right