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: I HATE ROBLOX WHY DOENST THIS WORK

Previous Thread :: Next Thread 
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
06 Jul 2015 07:49 PM
local plr = game.Players.LocalPlayer

while true do
wait()
if script.Parent.Parent.AwayGK.Value == true then
game.ServerStorage.Goalie:Clone().Parent = plr.Backpack
plr.Backpack.Stick:remove()
end
end
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
06 Jul 2015 07:50 PM
First off, dont use :remove(), use :Destroy()

Secondly, whats wrong? Any output?
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
06 Jul 2015 07:51 PM
no output :/
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
06 Jul 2015 07:53 PM
local plr = game.Players.LocalPlayer

while true do
wait()
if script.Parent.Parent.AwayGK.Value == true then
print("true")
game.ServerStorage.Goalie:Clone().Parent = plr.Backpack
plr.Backpack.Stick:Destroy()
else
print("false")
end
end


tell me what it prints
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
06 Jul 2015 07:56 PM
Scripting: 8.5/10

ya no
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
06 Jul 2015 08:05 PM
follow up.

Works good in studio

Doesn't work in real game
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
06 Jul 2015 08:14 PM
correct correction it only works in play solo mode
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
06 Jul 2015 08:14 PM
check your errors and debug your script


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
06 Jul 2015 08:17 PM
it doesn't produce a output tho...
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
06 Jul 2015 08:18 PM
>Make sure this is a local script

local P = game.Players.LocalPlayer

while wait() do local V = script.Parent.Parent:FindFirstChild'AwayGK'
if V.Value then print'true' game.ServerStorage.Goalie:Clone().Parent
= P.Backpack local S = P.Backpack:FindFirstChild'Stick' if S then S:
Destroy() end else print'false' end end
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
06 Jul 2015 08:23 PM
@mycheez

no outputs doesn't even print anything or work. But it does work in play solo. And yes all these scripts have been local

local P = game.Players.LocalPlayer

while wait() do
local V = script.Parent.Parent:FindFirstChild'AwayGK'
if V.Value then
print'true'
game.ServerStorage.Goalie:Clone().Parent = P.Backpack
local S = P.Backpack:FindFirstChild'Stick'
if S then
S:Destroy()
end
else
print'false'
end
end
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
06 Jul 2015 08:23 PM
local script

local player = game.Players.LocalPlayer
local awayGK = script.Parent.Parent.AwayGK

awayGK.Changed:connect(function()
if awayGK.Value then
game.ServerStorage.Goalie:Clone().Parent = player.Backpack
player.Backpack.Stick:Destroy()
end
end)


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
06 Jul 2015 08:23 PM
Incase it matters its local script inside startergui inside AwayGK Value
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
06 Jul 2015 08:25 PM
@time

didn't work only worked in play solo :/
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
06 Jul 2015 08:26 PM
script.Parent.Parent:FindFirstChild'AwayGK'
P.Backpack:FindFirstChild'Stick'


FindFirstChild is used like :FindFirstChild("itemhere")
not
:FindFirstChild'AwayGK'
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
06 Jul 2015 08:29 PM
If it's not working in online mode you need to show the output. Is there a nil value? You most likely have to do

WaitForChild("AwayGK") for example


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
06 Jul 2015 08:31 PM
"FindFirstChild is used like :FindFirstChild("itemhere")
not
:FindFirstChild'AwayGK'"

Incorrect.

:FindFirstChild'name'

^ That works correctly, much the same as

print'string'
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
06 Jul 2015 08:32 PM
@the
I know it works, it's just odd seeing that, but oh well.

Do you have FilteringEnabled on? If you do, you can't use this in a localscript.
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
06 Jul 2015 08:34 PM
Theres no output. I'm guessing your not allow to change peoples backpacks from startergui. Or something like that. I ended up improvising and pretty much duplicating the value from startergui once it becomes true to workspace. Then getting players name. Going through a normal script in workspace. And doing what I wanted. It sounds very inefficient because it probably was but it works so I'm good.

Thanks for help guys!
Report Abuse
Krosskode is not online. Krosskode
Joined: 26 Aug 2010
Total Posts: 11001
06 Jul 2015 08:35 PM
But, are you using FilteringEnabled or not?
Report Abuse
Septamology is not online. Septamology
Joined: 20 Jun 2013
Total Posts: 2811
06 Jul 2015 08:40 PM
Scripting: 8.5/10

ya no [2]
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