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: .Touched

Previous Thread :: Next Thread 
Zeloi is not online. Zeloi
Joined: 27 Sep 2010
Total Posts: 1143
27 Mar 2014 11:18 PM
script.Parent.Touched:connect(function(hit)
print(hit.Parent.Name)
local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
Player.PlayerGui.Arcade.TitleScreen.Visible = true
Player.PlayerGui.Arcade.Sidebar.Visible = true
Player.PlayerGui.Arcade.MusicCore.Visible = true
Player.PlayerGui.Arcade.GameArena.Visible = true
end)

Ummm... all I can say is nothing appears in output..and there are no errors in output or in script.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
27 Mar 2014 11:21 PM
Check for a Humanoid. If there's no Humanoid, it's not going to be a player. This will break the moment something that's not a character touches it.
Report Abuse
Zeloi is not online. Zeloi
Joined: 27 Sep 2010
Total Posts: 1143
27 Mar 2014 11:23 PM
like this?

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
print(hit.Parent.Name)
local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
Player.PlayerGui.Arcade.TitleScreen.Visible = true
Player.PlayerGui.Arcade.Sidebar.Visible = true
Player.PlayerGui.Arcade.MusicCore.Visible = true
Player.PlayerGui.Arcade.GameArena.Visible = true
end
end)

that didn't work ^
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
27 Mar 2014 11:26 PM
That should've worked. Any errors? Perhaps you directed to something wrong.
Report Abuse
Zeloi is not online. Zeloi
Joined: 27 Sep 2010
Total Posts: 1143
27 Mar 2014 11:29 PM
its a local script is that fine?
Report Abuse
Zeloi is not online. Zeloi
Joined: 27 Sep 2010
Total Posts: 1143
27 Mar 2014 11:33 PM
Bumpity Bumpity Bump.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
27 Mar 2014 11:37 PM
I don't see why it is.
Report Abuse
Zeloi is not online. Zeloi
Joined: 27 Sep 2010
Total Posts: 1143
27 Mar 2014 11:56 PM
The problem is the local

it was a local script

Report Abuse
KiwiTronik is not online. KiwiTronik
Joined: 18 Feb 2010
Total Posts: 3221
28 Mar 2014 02:39 AM
Only local scripts work in starter GUI,mstarter pac
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