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: Why won't this script work?

Previous Thread :: Next Thread 
GieseMan is not online. GieseMan
Joined: 25 Oct 2008
Total Posts: 199
11 Mar 2012 11:07 PM
player = script.Parent.Parent.Parent.Parent.Parent
gold = player.leaderstats.KOs
upgradeStuff = game.Lighting.Taco
function buy()
if gold.Value >= 2 then
gold.Value = gold.Value - 2
local a = upgradeStuff:clone()
a.Parent = player.Backpack
end
end
script.Parent.MouseButton1Down:connect(buy)



I placed the Taco in Lighting and this still doesn't work. Can anyone tell me why??
Report Abuse
Abillityx is not online. Abillityx
Joined: 26 Feb 2011
Total Posts: 3938
11 Mar 2012 11:39 PM
You used way to many parents. Try using :findFirstChild("WhatTheChildIsHere") method.
Report Abuse
GieseMan is not online. GieseMan
Joined: 25 Oct 2008
Total Posts: 199
12 Mar 2012 06:27 PM
What would I put in the parenthesis? I want it to find the player that is using it...but idk how to do it.
Report Abuse
GieseMan is not online. GieseMan
Joined: 25 Oct 2008
Total Posts: 199
12 Mar 2012 07:42 PM
Please help
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
12 Mar 2012 07:49 PM
You could insert a Local Script in it. Automaticly you could make the Player a variable by saying:

local Player = game.Players.LocalPlayer --Not sure if the spelling is right.

That should make things easier.

But remeber it has to be in a Local Script , in a Player to work.
Report Abuse
Abillityx is not online. Abillityx
Joined: 26 Feb 2011
Total Posts: 3938
12 Mar 2012 09:53 PM
Sorry, I meant to remove parenthesis. Just use only quotation marks for that part.
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