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 » Scripting Helpers
Home Search
 

Re: Why wont this script work?

Previous Thread :: Next Thread 
Ace23333 is not online. Ace23333
Joined: 20 Nov 2011
Total Posts: 1341
22 Feb 2014 06:57 PM
After "Loading Ship" it stops working, it wont move my character to that position for some reason. If someone could help...

function onClicked()
script.Parent.Text = "Aye, Aye!"
wait(2)
script.Parent.Text = "Loading Ship"
ship = game.ServerStorage.Ship:clone()
ship.Parent = game.Workspace
ship:moveto(-155, 1.8, -8)
wait(2)
script.Parent.Text = "Loading Player"
wait(1)
script.Parent.Text = "Done"
wait(1)
script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(-155, 19, -8)
script.Parent.Parent:remove()
end
script.Parent.MouseButton1Down:connect(onClicked)
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
22 Feb 2014 06:59 PM
2 things could be the issue

ship:moveto(-155, 1.8, -8)-- Should be Caps
ship:MoveTo(-155, 1.8, -8)--Like this

The other issue, this better be a normal script and not local
Report Abuse
Ace23333 is not online. Ace23333
Joined: 20 Nov 2011
Total Posts: 1341
22 Feb 2014 07:04 PM
Its normal script... And ship now spawns but rest of the code is still freezing...

I checked output and it says: Unable to cast double to Vector3

Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
22 Feb 2014 07:11 PM
Srry I dun goofed

ship:MoveTo((Vector3.new(-155, 1.8, -8))
Report Abuse
Ace23333 is not online. Ace23333
Joined: 20 Nov 2011
Total Posts: 1341
22 Feb 2014 07:16 PM
Yay!
That worked... Im quite new to scripting.
THANK YOU C:
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
22 Feb 2014 07:18 PM
game.ServerStorage works? I thought that ServerStorage wasn't a child of game after the game loaded... I've always used game:GetService("ServerStorage"), lol.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
22 Feb 2014 07:20 PM
It should. I mean game.Workspace works right?
And game.Players.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
22 Feb 2014 07:21 PM
Aw,everyone beat me to it,so this is pointless but..
ship:MoveTo(Vecto3.new(x,yz))
Should fix it(is what I was gonna say)
Report Abuse
Ace23333 is not online. Ace23333
Joined: 20 Nov 2011
Total Posts: 1341
22 Feb 2014 07:56 PM
Actually game Lightning doesn't seem to work for me while ServerStorage works perfectly
Report Abuse
EnderDeathX is not online. EnderDeathX
Joined: 02 Dec 2013
Total Posts: 30
23 Feb 2014 12:45 AM
function onClicked()
script.Parent.Text = "Aye, Aye!"
wait(2)
script.Parent.Text = "Loading Ship"
ship = game.ServerStorage.Ship:clone()
ship.Parent = game.Workspace
ship:MoveTo((Vector3.new(-155, 1.8, -8))
wait(2)
script.Parent.Text = "Loading Player"
wait(1)
script.Parent.Text = "Done"
wait(1)
script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(-155, 19, -8)
script.Parent.Parent:remove()
end
script.Parent.MouseButton1Down:connect(onClicked)

Problem Solved. Actually it was Pretty Simple.. Suggestion: You should learn scripting.


Actually your a pretty good scripter to create that script
Report Abuse
Ace23333 is not online. Ace23333
Joined: 20 Nov 2011
Total Posts: 1341
23 Feb 2014 04:02 AM
Since nobody actually wanted to help me i started scripting my game on my own... That is only way to learn...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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