So I need some help with setting a variable to a different variable. Here's the code block:
I am trying to get the value of Shipsname (Which is the models name that is in Workspace) and put it into another variable called Object. This models name varies and so I need a variable to represent it.(Called Shipsname)
Shipsname = game.Players.LocalPlayer.Character.Shipsname--Working on this
Camera = game.Workspace.CurrentCamera
Object = game.Workspace.Shipsname.BodyKit.Grok
Player = script.Parent.Humanoid
Camera.CameraSubject = Object
Camera.CameraType=3
while true do
wait()
if Player.Sit == false then
Camera.CameraSubject = Player
script:Remove()
end
end
Help is appreciated. Sorry if its confusing. I'll try and clear up any questions you may have.

9 comments
You changed the while loop but that doesn't have much to do with the variable issue.
I didn't only change that.
I'll try and re-explain. The model name is going to change. Therefore I need a variable that changes with it. In this case I want that variable to be "Shipsname". The problem is, the program thinks that when I say game.Workspace.Shipsname, it things the model is called "Shipsname" when its actually something that the variable represents.
Done, I edited.
I got this error: 16:31:08.162 - Workspace.Player.CameraChange:17: bad argument #2 to '?' (string expected, got userdata) 16:31:08.164 - Script 'Workspace.Player.CameraChange', Line 17 16:31:08.165 - Stack End
Sorry, That was an object value not a string. I found my mistake.
Ok it didn't work the first time so I just changed the Shipsname.Name to Shipsname.Value. After that, things worked smoothly so thanks alot!
You never said that Shipsname was a value.
Ah, well it was. heh