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 » Club Houses » Clans & Guilds
Home Search
 

Re: When scripting

Previous Thread :: Next Thread 
Inevera is not online. Inevera
Joined: 31 Dec 2014
Total Posts: 22514
01 Jun 2015 12:05 PM
Does taking the code to the next line matter or affect it?

Im currently learning to script and i have a really long 1 line code
I am a jellyfish.
Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
01 Jun 2015 12:06 PM
uhm kinda not sure, stop questioning me you perv


¡( ͡° ͜ʖ ͡ °)!
Report Abuse
HeyOverHere is online. HeyOverHere
Joined: 09 Feb 2012
Total Posts: 1838
01 Jun 2015 12:06 PM
scripting is like a putting in a specific action to do something, so ya.

1 error in the script affects it.


~Teh Villainous Wizard Kitteh
Report Abuse
LordValkrie is not online. LordValkrie
Joined: 25 Feb 2012
Total Posts: 11344
01 Jun 2015 12:07 PM
It shouldn't, unless that line defines a variable.


~A Vagabond Battle-Born~//Join Argo Rebellion Today!\\
Report Abuse
Inevera is not online. Inevera
Joined: 31 Dec 2014
Total Posts: 22514
01 Jun 2015 12:09 PM
if.game.Workspace.Player.Head.Transparency.==1 then Instance.new("Part",game.Workspace)elseif game.Workspace.Player.Head.Transparency==.5 then instance.new("WedgePart",game.Workspace end

Thats all in 1 line


I am a jellyfish.
Report Abuse
Walyn is not online. Walyn
Top 100 Poster
Joined: 30 May 2007
Total Posts: 14570
01 Jun 2015 12:10 PM
run it and see what happens
Report Abuse
Unteralterbach is not online. Unteralterbach
Joined: 04 Dec 2014
Total Posts: 7651
01 Jun 2015 12:10 PM
i honestly dunno if formatting affects the scripting itself

but it's ugly anyway
Report Abuse
Vesperus is not online. Vesperus
Joined: 29 Oct 2013
Total Posts: 5146
01 Jun 2015 12:11 PM
just run it no harm done

-juicy as j ( ͡° ͜> ͡ °) | Anthony
Report Abuse
Inevera is not online. Inevera
Joined: 31 Dec 2014
Total Posts: 22514
01 Jun 2015 12:12 PM
unexpected symbol and i dont see it


I am a jellyfish.
Report Abuse
LordValkrie is not online. LordValkrie
Joined: 25 Feb 2012
Total Posts: 11344
01 Jun 2015 12:17 PM
No No No No.

Let me break this down,
when you put a period, ex. game.Workspace, then that means that whatever comes after the period, is a property of whats behind the period, workspace is a property of game.

So and if statement can't have period, so

This:

if.game.Workspace.Player.Head.Transparency==1 then

Turns into this:
if game.Workspace.Player.Head.Transparency==1 then

also
this:
Instance.new("Part",game.Workspace)elseif game.Workspace.Player.Head.Transparency==.5 then instance.new("WedgePart",game.Workspace

should be this:
local instancewedge = Instance.new("WedgePart")
local instance = Instance.new("Part")
Instance.new("Part")
instance.Parent = game.Workspace

elsif

game.Workspace.Player.Head.Transparency==.5
Instance.new("WedgePart")
instancewedge.Parent = game.Workspace

end

so all together is:

local instancewedge = Instance.new("WedgePart")
local instance = Instance.new("Part")

if game.Workspace.Player.Head.Transparency==1 then
Instance.new("Part")
instance.Parent = game.Workspace

elsif

game.Workspace.Player.Head.Transparency==.5
Instance.new("WedgePart")
instancewedge.Parent = game.Workspace

end


~A Vagabond Battle-Born~//Join Argo Rebellion Today!\\
Report Abuse
LordValkrie is not online. LordValkrie
Joined: 25 Feb 2012
Total Posts: 11344
01 Jun 2015 12:20 PM
The unexpected symbol might be this:

if.game.Workspace.Player.Head.Transparency.==1 then

Also when calling a player, put it in a local script, so you can do this:

game.Players.LocalPlayer.Head.Transparency = 1



~A Vagabond Battle-Born~//Join Argo Rebellion Today!\\
Report Abuse
LordValkrie is not online. LordValkrie
Joined: 25 Feb 2012
Total Posts: 11344
01 Jun 2015 12:20 PM
if.game.Workspace.Player.Head.Transparency.==1 then

the period after transparency is the unexpected symbol

~A Vagabond Battle-Born~//Join Argo Rebellion Today!\\
Report Abuse
Inevera is not online. Inevera
Joined: 31 Dec 2014
Total Posts: 22514
01 Jun 2015 12:30 PM
o_e
Report Abuse
MrZelo is not online. MrZelo
Joined: 07 Jul 2008
Total Posts: 47891
01 Jun 2015 12:32 PM
Is this for that fort you're making for VE
Report Abuse
LordEnergize is not online. LordEnergize
Joined: 20 Sep 2012
Total Posts: 1325
01 Jun 2015 12:33 PM
. means parent of


so

game.Workspace


game is the parent of workspace

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Clans & Guilds
   
 
   
  • 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