youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 25 Apr 2014 04:50 PM |
This is a local script in a brick:
local ting = 0 function onTouched(hit) if ting == 0 then ting = 1 check = hit.Parent:FindFirstChild("Humanoid") if check ~= nil then game.Lighting.GUI1:clone().Parent = game.Players.LocalPlayer.PlayerGui wait(5) game.Players.LocalPlayer.PlayerGui.GUI1:remove()
ting = 0 end end end script.Parent.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 04:52 PM |
repeat wait() until game.Players.LocalPlayer
at the top^ |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 04:53 PM |
"a LOCAL SCRIPT in a brick" There's your problem, it's a local script. Change it to a regular script and edit the script accordingly.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 25 Apr 2014 04:56 PM |
| So, if I put it in normal script and do what sensei said, should it work? |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 04:56 PM |
| What I said usually works for Local Scripts.. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 04:57 PM |
@Sensei But he's got a local script in a brick. You can only have local scripts working when they're descendants of the player.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 25 Apr 2014 04:58 PM |
| PlayerGui is a descendant of the player. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 04:59 PM |
@youssef Where is the script? I know it's in a brick, but where?
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
| |
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
| |
|
|
| 25 Apr 2014 05:02 PM |
@youssef Make the local script a regular script and edit it accordingly. Local scripts don't run unless their parent is a descendant of the player or the player itself.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
| |
|
|
| 25 Apr 2014 05:03 PM |
http://wiki.roblox.com/index.php?title=RBX.lua.LocalScript_(Object) For further reading. :P
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2014 05:08 PM |
if check ~= nil then ypcall(function() game.Lighting.GUI1:clone().Parent = game.Players[hit.Parent.Name].PlayerGui end) end
|
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 25 Apr 2014 05:17 PM |
| I decided to make it a hunt for faces and make it a 1 player server. So it "Injects" GUI1 into StarterGui, but it still doesn't work. |
|
|
| Report Abuse |
|
|