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 » Scripters
Home Search
 

Re: SCRIPT WONT WORK HELP ASAP

Previous Thread :: Next Thread 
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
12 Dec 2016 07:48 PM
It wont give the gear to the player but everything else works.

script.Parent.MouseButton1Down:connect(function(click)
if game.Players.LocalPlayer.Eggs.Value >= 75 then
game.Players.LocalPlayer.Eggs.Value = game.Players.LocalPlayer.Eggs.Value -75
local coil = game.ReplicatedStorage:FindFirstChild("Gravity Coil"):Clone()
coil.Parent = game.Players.LocalPlayer.Backpack

local coilStarter = coil:Clone()
coilStarter.Parent = game.Players.LocalPlayer.StarterGear
if game.Players.LocalPlayer.Eggs.Value <= 75 then
print'less'
game.Players.LocalPlayer.Eggs.Value = game.Players.LocalPlayer.Eggs.Value
end
end
end)



#1 Poopposter on ATR
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
12 Dec 2016 07:58 PM
bb


#1 Poopposter on ATR
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
12 Dec 2016 08:04 PM
why do ppl read but not help

rip


#1 Poopposter on ATR
Report Abuse
alij12 is not online. alij12
Joined: 03 Oct 2011
Total Posts: 1204
12 Dec 2016 08:05 PM
is FE enabled


Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
12 Dec 2016 08:05 PM
FE is not enabled


#1 Poopposter on ATR
Report Abuse
alij12 is not online. alij12
Joined: 03 Oct 2011
Total Posts: 1204
12 Dec 2016 08:07 PM
script.Parent.MouseButton1Down:connect(function(click)
if game.Players.LocalPlayer.Eggs.Value >= 75 then
print("cloning")
game.Players.LocalPlayer.Eggs.Value = game.Players.LocalPlayer.Eggs.Value -75
local coil = game.ReplicatedStorage:FindFirstChild("Gravity Coil"):Clone()
coil.Parent = game.Players.LocalPlayer.Backpack

local coilStarter = coil:Clone()
coilStarter.Parent = game.Players.LocalPlayer.StarterGear
if game.Players.LocalPlayer.Eggs.Value < 75 then
print'less'
game.Players.LocalPlayer.Eggs.Value = game.Players.LocalPlayer.Eggs.Value
end
end
end)

let me know if it prints cloning in the output


Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
12 Dec 2016 08:13 PM
it prints but still no gear


#1 Poopposter on ATR
Report Abuse
Lykaon is not online. Lykaon
Joined: 27 Oct 2014
Total Posts: 784
12 Dec 2016 08:14 PM
Backpack, not startergear


Epix Incorporated Agent Lykaon || #game.Players.PlayerAdded:connect(function(plr) plr:Kick() end)
Report Abuse
alij12 is not online. alij12
Joined: 03 Oct 2011
Total Posts: 1204
12 Dec 2016 08:14 PM
Thats odd, check your gear and try changing it to a server script?

Although it should function the same if FE is disabled.


Report Abuse
Lykaon is not online. Lykaon
Joined: 27 Oct 2014
Total Posts: 784
12 Dec 2016 08:14 PM
wait, sorry. use an if statement to check if theres a coil.


Epix Incorporated Agent Lykaon || #game.Players.PlayerAdded:connect(function(plr) plr:Kick() end)
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
12 Dec 2016 08:16 PM
this is a local script inside the gui i can't use a server script

also would this work for the if statement?

if game.Replicated:FindFirstChild("Gravity Coil") ~= nil then
code


#1 Poopposter on ATR
Report Abuse
FlamedSkull is not online. FlamedSkull
Joined: 23 May 2009
Total Posts: 1379
12 Dec 2016 08:23 PM
I did a little reformatting...

local Button,Coil = script.Parent,game.ReplicatedStorage:FindFirstChild'Gravity Coil'
local User = game.Players.LocalPlayer
local Eggs = User.Eggs

Button.MouseButton1Down:connect(function()
if Eggs and Coil then
if Eggs.Value >= 75 then
Eggs.Value = Eggs.Value - 75
Coil:Clone().Parent = User.Backpack
Coil:Clone().Parent = User.StarterGear
end
else
print'No eggs or coil'
end
end)


Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
12 Dec 2016 08:27 PM
Flamed,
Ty for making it shorter.

Still not working though :(


#1 Poopposter on ATR
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
13 Dec 2016 09:46 AM
Bump
Report Abuse
12904 is online. 12904
Joined: 29 Oct 2012
Total Posts: 441
13 Dec 2016 10:09 AM
Make sure the gravity coil in Storage Is name "Gravity Coil" exactly!
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
13 Dec 2016 12:36 PM
it is


#1 Poopposter on ATR
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
13 Dec 2016 12:59 PM
so lonely


#1 Poopposter on ATR
Report Abuse
KritikalGunzz is not online. KritikalGunzz
Joined: 10 Nov 2013
Total Posts: 1633
13 Dec 2016 01:30 PM
Make sure that Eggs actually exists inside the player by running in in test mode and checking the children of the player
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
13 Dec 2016 01:44 PM
eggs is a child of the player


#1 Poopposter on ATR
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
13 Dec 2016 02:02 PM
k bump


#1 Poopposter on ATR
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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