i cant make a house become tiny this is my code:
local pos = game.Workspace.Union.BodyPosition local function closeInOnPlayer() wait(2) pos.Position = (14.615, 0.5, -35.65) end script.Parent.Touched:connect(closeInOnPlayer())
When manipulating something that has multiple values assigned to it like Position
you must use Vector3
Vector3
takes 3 values. x, y, x
. Also what you know as a Position
in the Workspace.
Using your code:
local pos = game.Workspace.Union.BodyPosition local function closeInOnPlayer() wait(2) pos.Position = Vector3.new(14.615, 0.5, -35.65) -- Added 'Vector3.new' end script.Parent.Touched:connect(closeInOnPlayer) --Got rid of parenthesis
Give this a try and let me know if it works!
More info on Vector3: http://wiki.roblox.com/index.php?title=Vector3
EDIT: I also noticed you called your function incorrectly on Line 6. I got rid of the parenthesis for you.