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: ???

Previous Thread :: Next Thread 
Abandion is not online. Abandion
Joined: 17 Apr 2010
Total Posts: 4344
18 Aug 2016 04:43 PM
game.Workspace.cannon.Position = game.Workspace.cannonlocator.Position

= has red underline, says "expected identifier, got ="

I am not very good at scripting, can someone explain this to me?
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
18 Aug 2016 04:46 PM
Is that the entire script? That bit looks fine to be assuming you got the names of the objects right.
Report Abuse
Abandion is not online. Abandion
Joined: 17 Apr 2010
Total Posts: 4344
18 Aug 2016 04:49 PM
I changed it a bit since I posted this, now it says " Invalid value for enum Shape" in output

function fire()
Instance.new("Part")game.Workspace.Name.cannon
game.Workspace.cannon.Shape = Ball
game.Workspace.cannon.Position = game.Workspace.cannonlocator.Position
end

game.Workspace.button.ClickDetector.Mouseclick: connect(fire)
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
18 Aug 2016 04:49 PM
workspace.Cannon.CFrame = workspace.CannonLocator.CFrame


Report Abuse
nooneisback is not online. nooneisback
Joined: 28 Feb 2012
Total Posts: 1672
18 Aug 2016 04:49 PM
It takes the cannon and places it just above the cannonlocator. If you want it to go onto the exact position do this: game.Workspace.cannon.CFrame = CFrame.new(game.Workspace.cannonlocator.Position)


Borred
Report Abuse
nooneisback is not online. nooneisback
Joined: 28 Feb 2012
Total Posts: 1672
18 Aug 2016 04:50 PM
Posted before you replied*


Borred
Report Abuse
Abandion is not online. Abandion
Joined: 17 Apr 2010
Total Posts: 4344
18 Aug 2016 04:51 PM
I set the cannonlocater 1 stud below where I want the cannon to be
Report Abuse
Abandion is not online. Abandion
Joined: 17 Apr 2010
Total Posts: 4344
18 Aug 2016 04:52 PM
The problem seems to be here:

game.Workspace.cannon.Shape = Ball
Report Abuse
nooneisback is not online. nooneisback
Joined: 28 Feb 2012
Total Posts: 1672
18 Aug 2016 04:52 PM
Shapes are enums, Enum.PartType.Ball


Borred
Report Abuse
Abandion is not online. Abandion
Joined: 17 Apr 2010
Total Posts: 4344
18 Aug 2016 04:56 PM
Game is still underlined in red
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
18 Aug 2016 04:57 PM
'Ball'
Enum.Shape.Ball

part.Shape = insert_shape_here
Report Abuse
Abandion is not online. Abandion
Joined: 17 Apr 2010
Total Posts: 4344
21 Aug 2016 04:01 PM
Still confused, decided to bump
Report Abuse
nooneisback is not online. nooneisback
Joined: 28 Feb 2012
Total Posts: 1672
22 Aug 2016 03:06 AM
With what?
Report Abuse
ServerDaddy is not online. ServerDaddy
Joined: 23 Aug 2015
Total Posts: 15857
22 Aug 2016 03:15 AM
a little more .
Report Abuse
ServerDaddy is not online. ServerDaddy
Joined: 23 Aug 2015
Total Posts: 15857
22 Aug 2016 03:19 AM
go into more detail .
Report Abuse
ThesnipzzdoYTOffical is not online. ThesnipzzdoYTOffical
Joined: 13 Jun 2015
Total Posts: 2
22 Aug 2016 03:27 AM
Is There Any Good Programmers That Can Help Me With My Game I Am A Good Programmer But I Need One Or Two More People To Help Me Script My Game Because Sometimes I Take A Whole Week To Find Out How To Fix A Problem With My Game Trust Me I Tried So Many Things For My Current Problem On My Game Which Is Trying To Make A Player On A Permanent Team So When Someone Tries Tries To Be A Type Of Class On My Game My Game Is A Rpg And The Classes Are Knights Archers And Wizards But My Game Is You Pick The Class Every time You Rejoin The Game And My Leader boards And Every Thing Is Messed Up


Report Abuse
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
22 Aug 2016 03:37 AM
Is There Any Good Programmers That Can Help Me With My Game I Am A Good Programmer But I Need One Or Two More People To Help Me Script My Game Because Sometimes I Take A Whole Week To Find Out How To Fix A Problem With My Game Trust Me I Tried So Many Things For My Current Problem On My Game Which Is Trying To Make A Player On A Permanent Team So When Someone Tries Tries To Be A Type Of Class On My Game My Game Is A Rpg And The Classes Are Knights Archers And Wizards But My Game Is You Pick The Class Every time You Rejoin The Game And My Leader boards And Every Thing Is Messed Up
Report Abuse
Milenveliki is not online. Milenveliki
Joined: 14 Aug 2013
Total Posts: 1097
22 Aug 2016 04:27 AM
--[[try this:]]game.Workspace.cannon.Shape=[[Ball]]
Report Abuse
nooneisback is not online. nooneisback
Joined: 28 Feb 2012
Total Posts: 1672
22 Aug 2016 07:38 AM
The Velocity represents the direction in which the ball will fly, for example Vector3.new(0,0,0) will launch it upwards

function fire(Velocity)
local Ball = Instance.new("Part")game.Workspace.Name.cannon
Ball.Shape = Enum.Shape.Ball
Ball.Position = game.Workspace.cannonlocator.Position
Ball.Velocity = Velocity
end

game.Workspace.button.ClickDetector.Mouseclick: connect(fire)
Report Abuse
nooneisback is not online. nooneisback
Joined: 28 Feb 2012
Total Posts: 1672
22 Aug 2016 07:39 AM
Vector3.new(0,10,0)
Report Abuse
Fluffy_Husky is not online. Fluffy_Husky
Joined: 23 May 2016
Total Posts: 763
22 Aug 2016 07:40 AM
0,0,0 is no motion lmao
Report Abuse
nooneisback is not online. nooneisback
Joined: 28 Feb 2012
Total Posts: 1672
22 Aug 2016 07:41 AM
Typo, I fixed it 5 seconds later.
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