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: Whats wrong with this script my scripter made?

Previous Thread :: Next Thread 
Banlio is not online. Banlio
Joined: 28 Mar 2014
Total Posts: 35
04 Jul 2014 07:36 PM
script.Parent.Touched:connect(function(TestingPart)
--h = game.Workspace.TestingPartScript.Parent:findFirstChild("Humanoid")
local humanoid = part.Parent:findFirstChild("Humanoid")
if h then
wait (1)
game.StarterGui.ScreenGui.TextLabel.Visible = true
wait(1)
game.StarterGui.ScreenGui.TextLabel.Text = "I am behind you!"
--game.StarterGui.ScreenGui.Test.Sound:play()
wait(1)
game.StarterGui.TextLabel.Visible = false
end
end)
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 07:38 PM
Could you explain with more detail the problem you're having with the script?.
Report Abuse
Frostglacier is not online. Frostglacier
Joined: 28 Oct 2010
Total Posts: 4177
04 Jul 2014 07:38 PM
I don't know, what IS wrong with it?

We can't fix something without knowing the error.

Is it not running? Is something not showing up? Please do tell.
Report Abuse
Banlio is not online. Banlio
Joined: 28 Mar 2014
Total Posts: 35
04 Jul 2014 07:39 PM
Not showing up.
I also did this, but you can't make Locals stand for something.
script.Parent.Touched:connect(function(TestingPart)
--h = game.Workspace.TestingPartScript.Parent:findFirstChild("Humanoid")
h =local humanoid = part.Parent:findFirstChild("Humanoid")
if h then
wait (1)
game.StarterGui.ScreenGui.TextLabel.Visible = true
wait(1)
game.StarterGui.ScreenGui.TextLabel.Text = "I am behind you!"
--game.StarterGui.ScreenGui.Test.Sound:play()
wait(1)
game.StarterGui.TextLabel.Visible = false
end
end)
Report Abuse
WishNite is not online. WishNite
Joined: 11 Feb 2009
Total Posts: 15828
04 Jul 2014 07:39 PM
it updates the startergui instead of the playergui.
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 07:39 PM
Add a variable to find the player in "Players" and change game.Starter to Player.PlayerGui and inform us of the result.
Report Abuse
Typocrite is not online. Typocrite
Joined: 28 Aug 2013
Total Posts: 6856
04 Jul 2014 07:41 PM
Why are there 2 lines that are commented out?

Remove the "--"'s
Report Abuse
Banlio is not online. Banlio
Joined: 28 Mar 2014
Total Posts: 35
04 Jul 2014 07:44 PM
still isn't working.
Report Abuse
Frostglacier is not online. Frostglacier
Joined: 28 Oct 2010
Total Posts: 4177
04 Jul 2014 07:47 PM
script.Parent.Touched:connect(function(part)
local humanoid = part.Parent:findFirstChild("Humanoid")
if h then
wait (1)
character = part.Parent
player = game.Players:GetPlayerFromCharacter(character)
player.ScreenGui.TextLabel.Visible = true
player.ScreenGui.TextLabel.Text = "I am behind you!"
wait(1)
player.TextLabel.Visible = false
end
end)
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 07:55 PM
Change player.ScreenGui to,
player.PlayerGui.ScreenGui
Report Abuse
Frostglacier is not online. Frostglacier
Joined: 28 Oct 2010
Total Posts: 4177
04 Jul 2014 07:57 PM
Ah, yes. Do that.
Report Abuse
Banlio is not online. Banlio
Joined: 28 Mar 2014
Total Posts: 35
04 Jul 2014 11:36 PM
it doesn't work I want the local to stand for h
Report Abuse
Banlio is not online. Banlio
Joined: 28 Mar 2014
Total Posts: 35
05 Jul 2014 11:55 PM
I also tried this. But doesn't work and ice that script doesn't work.

script.Parent.Touched:connect(function(part)
local humanoid = part.Parent:findFirstChild("Humanoid")
if humanoid then
wait (1)
character = part.Parent
player = game.Players:GetPlayerFromCharacter(character)
player.ScreenGui.TextLabel.Visible = true
player.ScreenGui.TextLabel.Text = "I am behind you!"
wait(1)
player.TextLabel.Visible = false
end
end)
Is it this?
No right?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
05 Jul 2014 11:58 PM
script.Parent.Touched:connect(function(part)
local humanoid = part.Parent:findFirstChild("Humanoid")
if humanoid then
wait (1)
character = part.Parent
player = game.Players:GetPlayerFromCharacter(character)
if player then
player.PlayerGui.ScreenGui.TextLabel.Visible = true
player.PlayerGui.ScreenGui.TextLabel.Text = "I am behind you!"
wait(1)
player.PlayerGui.ScreenGui.TextLabel.Visible = false
end
end
end)
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