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

What I need to make to this script dont have an invalid argument #3?

I made a script for wait 10 seconds and make a room and enable a PointOfLight of a part. like this

function RoundGenerate(position,size,orientation,anchored)
	local Round = Instance.new("Part",game.Workspace)
	Round.Anchored = anchored
	Round.Transparency = 0
	Round.Reflectance = 0
	Round.Size = size
	Round.Position = position
	Round.Orientation = orientation
end
wait(10)
RoundGenerate("WallOne",Vector3.new("41.5, 9.5, -229.5"),Vector3.new("53, 1, 19"),Vector3.new("-90,90,0")) 
RoundGenerate("WallTwo",Vector3.new("-2.5, 9.5, -229.5"),Vector3.new("53, 1, 19"),Vector3.new("-90,90,0"))
RoundGenerate("WallThree",Vector3.new("18.5, 9.5, -203.5"),Vector3.new("43, 1, 19"),Vector3.new("-90,-180,0"))
RoundGenerate("WallFour",Vector3.new("18.5, 9.5, -255.5"),Vector3.new("43, 1, 19"),Vector3.new("90,-180,0"))
RoundGenerate("WallFive",Vector3.new("18.5, 19.5, -229.5"),Vector3.new("53, 1, 43"),Vector3.new("0, -90, 180"))

but always have an script error and this script error is

invalid argument #3 (Vector3 expected, got string) 

4 comments

0

idk why guys pls help

0

Please edit your question to include the script inside of a code block (Highlight all of your code, and click the little lua button)

0

And make sure its formatted right. Posting a wall of text without formatting or a code block is a quick way not to get help

0

done

2 answers

The walls are variables not values. You need to use the wall position if you want to do that.

Problem here is you need a argument called name and the function thinks that for a example "Wall one" is a position.

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