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: K I think I learned scripting all wrong

Previous Thread :: Next Thread 
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
08 Apr 2014 11:12 AM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
08 Apr 2014 11:17 AM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
08 Apr 2014 11:22 AM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
08 Apr 2014 11:27 AM
[ Content Deleted ]
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
08 Apr 2014 11:39 AM
Neon, nobody will help you if you demand for help. Just wait patiently and someone will answer.

When life gives you lemons... BURN HIS HOUSE DOWN! >:D
Report Abuse
chris046 is not online. chris046
Joined: 20 Jul 2008
Total Posts: 31
08 Apr 2014 11:53 AM
Lua is quiet different then Java. You don't put when it activates in the function name.
Example


Function bob()
Print("Hello World")
end



game.Workspace.brick.onTouched:connect(bob)

This may not be to accurate, writing this from school. Hope this helps!
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
08 Apr 2014 12:01 PM
function bob()
not
Function
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
08 Apr 2014 12:01 PM
also
.Touched
not
.OnTouched

OnTouched is a function name,not an event
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Apr 2014 12:18 PM
f=script.Parent
plr=game.Players.PlayerAdded
char=plr.Character
hum=char.Humanoid
part.Touched:connect(hum)--Inside here you need a parameter. However, the parameter for any :connect method would have to be a function.
Also, an Event is kind of like a Property with a ton of flexibility. It is a property that activates when something happens, and you can determine what happens by a function. The :connect you can think of as a glue to "connect" The event/property and function together.




--Idk what to put for when you lock firstperson here. I thought I did but..
end
end)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
08 Apr 2014 01:11 PM
script.Parent.Touched:connect(function(h)
if h.Parent:FindFirstChild("Humanoid") then
plr = game.Players:GetPlayetFromCharacter(h.Parent)
plr.CameraMode = "LockFirstPerson"
end
end)
Report Abuse
bob354293 is not online. bob354293
Joined: 26 Oct 2008
Total Posts: 2609
08 Apr 2014 01:14 PM
Guy above
Using the new way
NEED TO KEEP THE OLD WAY OF ROBLOX SCRIPTING BACK
However, you guys called for bob, how may i help you? ;)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
08 Apr 2014 01:23 PM
What do you mean "new" way?
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