Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you make an object clone near the local client?

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?

2 comments

0

Mod:MoveTo(Vector3.new(X, Y, Z))

0

Didn't work

1 answer

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)

1 comment

0

Doesn't seem to work

This discussion is preserved as it was. New answers, comments, and votes are closed.