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: This script that has no output.

Previous Thread :: Next Thread 
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
29 Jan 2012 02:36 AM
function onTouch(hit)
if hit.Parent:findFirstChild("Humanoid") ~= nil then
        game.Workspace.Winner.Value = hit.Parent.Name
script.Parent.Parent:Remove()
        end
    end

script.Parent.Touched:connect(onTouch)


Ok, so, its in lighting, and then the minigame clones, this button is in it, its supposed to be the end of minigame thing. I dont really know whats wrong.
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
29 Jan 2012 03:30 AM
bump
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
29 Jan 2012 04:37 AM
if hit.Parent:findFirstChild("Humanoid") ~= nil then -- Why that complicated?
if hit.Parent:findFirstChild("Humanoid") then -- easier
Is Winner a string value? Check that. And make a debouncer. Scripts that work with touch interest get fired very often on one hit.
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
29 Jan 2012 04:43 AM
did you say the script is in Lighting, if so the script will not run, place it in Workspace
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
29 Jan 2012 04:56 AM
yeah the map with the button in it gets cloned from lighting.
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
29 Jan 2012 05:15 AM
local debounce = false
function onTouch(hit)
debounce = true
if hit.Parent:findFirstChild("Humanoid") then
        game.Workspace.Winner.Value = hit.Parent.Name
game.Workspace.Map[game.Workspace.Map.Value]:Remove()
    debounce = false
        end
    end

script.Parent.Touched:connect(onTouch)


it still no work
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
29 Jan 2012 06:22 AM


BRING
UP
MY
POST
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
29 Jan 2012 07:32 AM
Sigh,
Bump
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