generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Model Moving Problem.

Previous Thread :: Next Thread 
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
06 Sep 2015 01:04 AM
I have a brick placed, the brick spawns a model and uses :MoveTo() to get it to it, the problem is that the model is suppose to be merged into the brick and I can't figure out how (Tried Vector3 and CFrame). Any idea how?
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
06 Sep 2015 01:08 AM
If you want the model to merge with the brick you can either use model:SetPrimaryPartCFrame() or:

model:MoveTo(targetPos)
model:TranslateBy(0, targetPos.Y - model:GetModelCFrame().Y, 0)
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
06 Sep 2015 01:22 AM
Script looks like this:

game.Workspace:WaitForChild(game.Players.LocalPlayer.Name)

local house = game.ReplicatedStorage.House1:Clone()
house.Parent = workspace
house:MoveTo(game.Workspace.HouseSpawns.HouseSpawnLocation1.Position)
house:TranslateBy(0, game.Workspace.HouseSpawns.HouseSpawnLocation1.Position.Y - house:GetModelCFrame().Y, 0)

getting the error of:

18:20:47.842 - Unable to cast double to Vector3
18:20:47.843 - Script 'Players.Player.Backpack.HouseTest', Line 6
18:20:47.843 - Stack End
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
06 Sep 2015 11:28 AM
oops, my bad:

model:TranslateBy(Vector3.new(0, targetPos.Y - model:GetModelCFrame().Y, 0))
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image