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())
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.
didnt work i went on it multiple times and it said 17:21:06.200 - Attempt to connect failed: Passed value is not a function 17:21:06.200 - Script 'Workspace.Part.Script', Line 6 17:21:06.201 - Stack End 17:21:09.066 - attempt to call a nil value 17:21:09.169 - attempt to call a nil value 17:21:12.062 - attempt to call a nil value
Try it again, I also noticed you had something extra on Line 6. Let me know if it works now.
didnt work no errors but nothing happens maybe ill add more force
Your code is just moving the object to a new location. Not sure what else you are trying to do. You may need to be more clear in your question.
im trying to shrink the house dat i made but dis time same thing no errors but did nothing
This script isn't going to shrink anything. This is just moving the location of the object.
wat would i use to shrink it and what code would i use
do u no
That is a lot more complex than you may be able to handle. It is also a lot of work. Unfortunately, I will not be able to help you with that. Although, I did fix what you provided at least. Good luck :)
i just copy and paste:3 so i dont have to rite tuns of stuff
Be sure to accept the answer if this helped!
i just thought of it or how to bc of u thx alot:D
Nice, Good luck!
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
it says stuff like this Workspace.Part.Script:4: ')' expected near ','