|
| 10 Nov 2014 03:03 PM |
When I'm in studio and I play solo it shows a model of me called "Player" and I want to remove a certain script from that player so when I join it removes it on start?
How would I do that? |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2014 03:05 PM |
| It's actually pretty simple... But I'll see who else will say :P -Hint- It has to do with repeat wait() until |
|
|
| Report Abuse |
|
|
inapt
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 11666 |
|
|
| 10 Nov 2014 03:05 PM |
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) char:WaitForChild("Name_Of_Script"):Destroy() end) end)
-ForeverDev |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 10 Nov 2014 03:05 PM |
game.Players.PlayerAdded:connect(function(plr) plr.CharactedAdded:connect(function(char) if char:findFirstChild("ScriptName") then char["ScriptName"]:remove() end end) end) |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 10 Nov 2014 03:06 PM |
| dont use inapt's it'll break if the script isn't in the character |
|
|
| Report Abuse |
|
|
inapt
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 11666 |
|
|
| 10 Nov 2014 03:09 PM |
well if you know the script is in the character then that will work...
theres no logic in removing something that u dont know is there or not
-ForeverDev |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2014 03:10 PM |
| Thanks guys but used inapts and worked perfect |
|
|
| Report Abuse |
|
|