Help with a tweeting script

When you specify the Instance on TweenService:Create() first parameter it gets the property from there so the Properties table would be:

local Properties = {
	Position =, 25.5, 0) 

local Tween = TweenService:Create(script.Parent, TweenInformation, Properties)

Btw it gives you that error because a table is a store of 1 or more values, so you can’t modify an Instance’s property inside them.

1 Like

what do you mean by values? Also I still don’t really understand tables.

Values are just “things” that you can store with a variable or table, such as strings, numbers and bools

oh. Okay. Also how to I refer to the part that is tweeting? Because I have to refer to the part because nothings referring to it in the script.

Yes, script.Parent is the parent of the script you are writting, so to refer to the part you would just need to put the script inside of the part.


is it a server or local script?

A server script would tween the part for everyone in the server, so it’s a server script.

okay. Also it still doesnt work. Since I think im referring to the screen gui too far.

Screen Shot 2021-07-31 at 5.02.20 PM

I have to refer to section 1

also it looks like this

Ah alright, now I understand what you want, so if you want it to show only for the person that clicked just do (Add this to the first version of the script):

local PartToTween = workspace.CameraRelated.CameraPart

local Properties = {
	Position =, 25.5, 0) 

local Tween = TweenService:Create(PartToTween, TweenInformation, Properties)

Now, if you want it to tween for everyone in the server you will need to use a RemoteEvent | Roblox Creator Documentation.

should the script look like this?

You cant store a vector as a dict key.

No, use a LocalScript inside of the button as before and use script.Parent to refer to it:



thanks it works now! I appreciate it a lot.

1 Like

whats a dict key? Im not sure I understand.

Hash table is the name of the data structure. Data structures and their application in Lua

okay. I will read its as soon as I can.


I tried doing this so its location would go to another parts location

But its position goes back to 0,0,0

Also theres a section one part and section one button. This is referring to the part. Camera Related is a folder its inside of.

You need to make a new topic, this was marked as solved.

oh okay. Thanks fro telling me that.