177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 25 Nov 2015 11:08 PM |
| How would I create a GUI button that "deletes?" the character, and allows them to move their camera freely as if they are in studio? |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2015 12:21 AM |
I'll search the wiki, I'm interested in how to do this as well....
I was once here. |
|
|
| Report Abuse |
|
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
| |
|
|
| 26 Nov 2015 02:09 PM |
| Set the Character to nil, set the CameraType to Fixed. |
|
|
| Report Abuse |
|
|
76km
|
  |
| Joined: 14 Aug 2015 |
| Total Posts: 5455 |
|
|
| 26 Nov 2015 02:10 PM |
I have done that before, once
just delete the character (Model) if it doesn't work, delete the player(under players) |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2015 02:11 PM |
Insert >> LocalScript >> Startgui
local p = game.Players.LocalPlayer
p.Character = nil
workspace.CurrentCamera.CameraType = "Fixed" |
|
|
| Report Abuse |
|
|
| |
|
76km
|
  |
| Joined: 14 Aug 2015 |
| Total Posts: 5455 |
|
|
| 26 Nov 2015 02:16 PM |
Wouldnt you made the parent nil, not the character?
p.Character.Parent = nil Camera.CameraType = "Fixed"
And couldn't you move it to lighting?
p.Character.Parent = game.Lighting Camera.CameraType = "Fixed" |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2015 02:17 PM |
| No, you would be changing the actual Property in Player to nil. And yeah moving it to Lighting would be good if you wanted to store it and get it back later. |
|
|
| Report Abuse |
|
|
76km
|
  |
| Joined: 14 Aug 2015 |
| Total Posts: 5455 |
|
|
| 26 Nov 2015 02:46 PM |
^^
there is your answer matey |
|
|
| Report Abuse |
|
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 27 Nov 2015 12:52 AM |
Thank you all for your replies. The script seems to work in solo mode, but when I go on an online server, it won't.
Anyone know why? |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 12:54 AM |
| Make sure it's a LocalScript in either PlayerGui or StarterPack |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 12:54 AM |
| Correction: StarterGui or StarterPack, also StarterPlayer works. |
|
|
| Report Abuse |
|
|
76km
|
  |
| Joined: 14 Aug 2015 |
| Total Posts: 5455 |
|
|
| 27 Nov 2015 12:59 AM |
ALSO make sure the script waits until the player exists.
I find its a tripping hazard |
|
|
| Report Abuse |
|
|
| |
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 27 Nov 2015 01:04 AM |
Hmmm, alright.
Would this line of code do?
game.Players.LocalPlayer:WaitForChild('PlayerGui') |
|
|
| Report Abuse |
|
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 27 Nov 2015 01:06 AM |
Here is the script:
game.Players.LocalPlayer:WaitForChild('PlayerGui') local p = game.Players.LocalPlayer p.Character = nil workspace.CurrentCamera.CameraType = "Fixed"
It works on solo, but not online. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 01:07 AM |
Just add repeat wait() until player.Character |
|
|
| Report Abuse |
|
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 27 Nov 2015 01:10 AM |
Where should that be added?
Can you add it into the script, I am kind of confused on where to add it in. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 01:12 AM |
local p = game.Players.LocalPlayer repeat wait() until p.Character p.Character = nil workspace.CurrentCamera.CameraType = "Fixed" |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 01:13 AM |
| You don't need the first line of the script btw |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 01:13 AM |
| How would you do it without removing the players character? |
|
|
| Report Abuse |
|
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 27 Nov 2015 01:15 AM |
| Didn't work again, and I'm not sure how to remove the character completely. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2015 01:20 AM |
| @177177, if the character is no longer in workspace, it has been removed "fully". |
|
|
| Report Abuse |
|
|
177117
|
  |
| Joined: 17 May 2010 |
| Total Posts: 1366 |
|
|
| 27 Nov 2015 01:21 AM |
| I got a temporary fix, I made the server 1 person only, making the script work now. |
|
|
| Report Abuse |
|
|