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

Vector3 is not A Model of Part ???

Hi i have a script when the player clicks a brick is going to spawn where the click was and i also figured out how the only problem is that i can not spown it left and right and most of the time it glitches i know it is a SIMPLE problem and since 2 days i am trying to solve it without success this is the Spowning script:

local cubeSize = 2.2
function convert(axis)
	return math.floor(axis / cubeSize) * cubeSize
end
			
local x,y,z = convert(mouseposx),convert(mouseposy),convert(mouseposz)

scriptfordestroy.Parent=clickdetector
part.CFrame=CFrame.new(x,y+1,z)
part.Rotation = Vector3.new(0,0,0)
part.Size=Vector3.new(2.2,2.2,2.2)
part.BrickColor=BrickColor.new(brickcolor)

If you Know Any Resourses that could help me please tell me Thank You ????

3 comments

0

isn't (X / Y) * Y = X?

0

yes it is

0

in wich line

1 answer

Vector3 is only on baseparts (in other words all parts), you should use a getdescendants loop and IsA("BasePart") to change the vector3.

1 comment

0

so what do you mean

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