I would like to know how to make an object clone near a character, I am currently making a drifting/driving game and I would like this info to spawn a car. Sorry if this is super simple, I am new to scripting, I only know basic GUI scripting. Here is the script I am using:
script.Parent.MouseButton1Click:connect(function(GetCar) Mod = game.ServerStorage.ToyotaSupra clone = Mod:clone(-230.75, 0.5, -18) clone.Parent = workspace clone:MakeJoints() end)
I tried using this:
mod.Position = Vector3.new(*A random pos to test*)
did nothing, help?
You can't have anything between the brackets in Clone(). Also, I added local before Mod = game... because I think you need local before the variable to actually create the variable
script.Parent.MouseButton1Click:connect(function(GetCar) local Mod = game.ServerStorage.ToyotaSupra clone = Mod:Clone() clone.Parent = workspace clone.PrimaryPart.CFrame = CFrame.new(Vector3.new(-230.75, 0.5, -18)) clone:MakeJoints() end)