Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 18 Feb 2016 08:35 AM |
Nothing happens when I test it..
local Frame = script.Parent:WaitForChild("Frame") function join(player) local value = Instance.new("BoolValue") value.Parent = game.Workspace value.Value = true value.Parent = game.Workspace if value.Value == true then Frame:Destroy() end end game.Players.PlayerAdded:connect(join)
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 08:38 AM |
Then that can means three things:
- The script is disabled - The script is a LocalScript, which makes PlayerAdded work funny - "Frame" is never being found << probably this one
Check to see if Frame is actually there when you test in Studio. |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 18 Feb 2016 08:40 AM |
How would you enable a script?
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 08:41 AM |
Click on it in Studio, look down at the Properties box and check if there is a check in the box named "Disabled" (it'll be at the bottom).
If the box is empty, your script is already enabled. |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 18 Feb 2016 08:43 AM |
It is enabled.. It's not a local script and I'm 100% sure that the parent for the frame is right..
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 08:45 AM |
print("Starting wait now") local Frame = script.Parent:WaitForChild("Frame") print("Ending wait now") function join(player) local value = Instance.new("BoolValue") value.Parent = game.Workspace value.Value = true value.Parent = game.Workspace if value.Value == true then Frame:Destroy() end end game.Players.PlayerAdded:connect(join)
-- Try this script and check the Output in Studio, tell me what it says |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 18 Feb 2016 08:50 AM |
"Starting wait now" That's all it says..
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 08:53 AM |
Then it doesn't find a child called 'Frame'
|
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 18 Feb 2016 08:54 AM |
Sorry about that I moved the script to the workspace without thinking.. I moved it back and now it does both the print things..
|
|
|
| Report Abuse |
|
|
| |
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 18 Feb 2016 09:00 AM |
Still not working.. But there's no value in the workspace from Instance.new
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 09:01 AM |
Go to the TEST tab in Studio, and click the "Start" button with a picture of server switches. That will create a local game server inside of your computer for you to test on. It'll probably work there.
PlayerAdded works in weird ways when you're using Solo mode. |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 18 Feb 2016 09:07 AM |
It worked.. But the thing is the script was meant for a solo game.. How would I fix it so it would be able to work on solo?
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2016 09:20 AM |
| If you mean a game server with only 1 player in it, it'll work fine. "Play Solo" means the entire game is run on the client's computer so PlayerAdded kinda breaks. |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
| |
|
ownedyou1
|
  |
| Joined: 03 Jul 2008 |
| Total Posts: 528 |
|
|
| 18 Feb 2016 10:12 AM |
| i personally would have done repeat wait() until script.Parent:findFirstChild("Frame")~=nil local Frame = script.Parent.Frame |
|
|
| Report Abuse |
|
|