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

Dont want to clone part,i didnt get error,i use server script, how to fix it?

local part = script.Parent

newpart = part:Clone()
newpart.Parent = workspace.Parent

2 answers

You never defined where you want the part to spawn. Also, you can use Instance.new if you just want to spawn a single part and you tried to set its parent to the game, which to my knowledge will make it not spawn, although I could be wrong, set it to workspace, or if you have another folder then just set it to there.

https://www.youtube.com/watch?v=ivqeeFwcixg - an instance.new tutorial on youtube

local part = script.Parent

newpart = part:Clone()
newpart.Parent = game.Workspace
newpart.Position = Vector3.new("0,0,0") -- set the position you want it to be set to.

if you want to use Instance.new then although I suggest watching a tutorial here's a script to do so

local part = script.Parent

newpart = Instance.new("Part")
newpart.Parent = game.Workspace
newpart.Poisiton = Vector3.new("0,0,0") -- set to the position you want it to be set to in vector3

Tell me if that works!

1 comment

0

First Vector3.new("0,0,0") dont need " " second it dont work

The issue is you are setting the new part's parent to workspace.Parent, which is game. In order for your part to exist in the world you want the part to be a descendant of workspace. In order to fix this you can just set the parent of the new part to workspace.

newpart.Parent = workspace

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