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: I was working on a script

Previous Thread :: Next Thread 
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
13 Feb 2014 09:00 AM
[ Content Deleted ]
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
13 Feb 2014 09:04 AM
[ Content Deleted ]
Report Abuse
EvilEquinox is not online. EvilEquinox
Joined: 23 Oct 2013
Total Posts: 166
13 Feb 2014 09:12 AM
function hit(part)
local plr = part.Parent:FindFirstChild("Humanoid")
if (plr ~= nil) then
p = plr.Parent.Name
game.Players.p.PlayerGui.GUINAMEHERE.Frame.Visible = true
end
end
script.Parent.Touched:connect(hit)
--Put the script in the part.
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
13 Feb 2014 01:46 PM
[ Content Deleted ]
Report Abuse
EvilEquinox is not online. EvilEquinox
Joined: 23 Oct 2013
Total Posts: 166
13 Feb 2014 03:26 PM
You have to post the full code for us to understand what you're trying to accomplish, please post the full code.
Report Abuse
ninjaxrasx is not online. ninjaxrasx
Joined: 29 May 2008
Total Posts: 757
13 Feb 2014 03:28 PM
One of the errors "findFirstChild("")

It's FindFirstChild("")
Report Abuse
EvilEquinox is not online. EvilEquinox
Joined: 23 Oct 2013
Total Posts: 166
13 Feb 2014 03:32 PM
I'm still not exactly sure what the OP is trying to do.
As my code would have worked for just making a GUI visible.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
13 Feb 2014 04:34 PM
plaor = game.Players:GetPlayerFromCharacter(hit)

Simple enough!
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
13 Feb 2014 04:38 PM
[ Content Deleted ]
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
13 Feb 2014 04:50 PM
These stupid people need to stop trying to fix things that aren't broken. FindFirstChild and findFirstChild work the same, just like Workspace, game.Workspace, and workspace.

player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
--stuff
end
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
13 Feb 2014 05:51 PM
[ Content Deleted ]
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
13 Feb 2014 05:53 PM
Yes it is lmfao.

if player then is the same as saying if player ~= nil then, it's just more advanced skiddy. Don't be hating unless you tried it bud :)
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
13 Feb 2014 05:55 PM
[ Content Deleted ]
Report Abuse
Azureous is not online. Azureous
Joined: 29 Jan 2012
Total Posts: 25287
13 Feb 2014 05:56 PM
local partYOUwant = game.Workspace["Part Name"];
partYOUwant.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent);
--code on the player variable;
end
end)
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
13 Feb 2014 05:56 PM
Also, OP

http://wiki.roblox.com/index.php?title=GetPlayerFromCharacter_(Method)

So goml fgt
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
13 Feb 2014 05:57 PM
another thing, OP, you never declared size so that script wouldn't do a thing.
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
13 Feb 2014 05:58 PM
script.Parent.Touched:connect(function(c)
pcall(function() local plr = game.Players:GetPlayerFromCharacter(c)
--stuff
end)
end)

Now there's no need to check for player.
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
13 Feb 2014 05:58 PM
[ Content Deleted ]
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
13 Feb 2014 06:00 PM
I'll explain it once you explain how my scripting is "fake" skid ;)
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
13 Feb 2014 06:00 PM
[ Content Deleted ]
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
13 Feb 2014 06:01 PM
You can't explain how my scripting is fake = you're a fking skid now go away and stop refusing my help
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
13 Feb 2014 06:02 PM
[ Content Deleted ]
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
13 Feb 2014 06:03 PM
Right because that makes sense.

You even told war "that doesn't look right"
Because you didn't know what GetPlayerFromCharacter is.

inb4 "youre fake"
inb4 "you didnt help so you dont know lua"

OP jump off a bridge
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
13 Feb 2014 06:04 PM
Also, if explaining how a basic (barely recursive) for loop means I know lua, then everyone should know lua by now.
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
13 Feb 2014 06:05 PM
[ Content Deleted ]
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