digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 27 Oct 2012 08:49 AM |
| I don't want to use Player:Destroy(), but I want to 'disconnect' a Player, so would a "ManualSurfaceJointsInstance" in the CurrentCamera or PlayerGui crash the player or would it still crash a server? If it would crash the server, would someone tell me an alternate method? |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 27 Oct 2012 08:59 AM |
| Use a local script with a while true do end in the player :3 |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 27 Oct 2012 09:00 AM |
I know localscripts only work clientside, but I'm making a GUI. Using RbxGui.
Soooooo, that wouldn't work. |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 27 Oct 2012 09:01 AM |
| Oh, that sux xD. I have an idea: Don't use RbxGui. |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 27 Oct 2012 09:04 AM |
I can't NOT use it. It would be too hard. Look:
function quitGame() end function saveAll() local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent plr:SaveNumber("Studs", game.Lighting[plr.Name].Studs.Value) plr:SaveNumber("Minerals", game.Lighting[plr.Name].Minerals.Value) plr:SaveNumber("Crystals", game.Lighting[plr.Name].Crystals.Value) plr:SaveInstance("Planet", workspace[plr.Name.."_Planet"]) quitGame() end RbxGui = assert(LoadLibary("RbxGui")) script.Parent.MouseButton1Down:connect( function() local saveDialogMessageBox local messageBoxButtons = {} messageBoxButtons[1] = {} messageBoxButtons[1].Text = "No" messageBoxButtons[1].Style = Enum.ButtonStyle.RobloxButtonDefault messageBoxButtons[1].Function = function() saveDialogMessageBox:Remove() quitGame() end messageBoxButtons[2] = {} messageBoxButtons[2].Text = "Yes" messageBoxButtons[2].Style = Enum.ButtonStyle.RobloxButtonDefault messageBoxButtons[2].Function = function() saveDialogMessageBox:Remove() saveAll() end saveDialogMessageBox = RbxGui.CreateStyledMessageDialog("Save Game","Do you want to save your game before quitting?", "Confirm", messageBoxButtons) saveDialogMessageBox.Visible = true saveDialogMessageBox.Parent =script.Parent.Parent.Parent.Parent.Parent end )
What do I do, if I don't use RbxGui? |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
| |
|
|
| 27 Oct 2012 09:20 AM |
| Make a LocalScript with some fancy linked source junk so it loads "Instance.new("ManualSurfaceJointInstance")" from a pre-made model, then load it into the game. Something like that c: |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 27 Oct 2012 09:24 AM |
But wouldn't ManualSurfaceJointsInstance crash the server? It's used in RemoteErrorMonitorScript, like so:
function shutdown() -- game:RequestShutdown() -- game:FinishShutdown()
-- until RequestShutdown is implemented, will have to use gross hack to just crash the server :( Instance.new("ManualSurfaceJointInstance", workspace) end
So, how would I change it so the ManualSurfaceJointInstance would ONLY crash the player? The reason why I want the player to crash is because if you use Player:Destroy() then everything still works - I want the player to not be able to update the camera. Mabye if I destory CurrentCamera after destroying the Player? |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2012 09:28 AM |
| Don't give it a parent, and run it from a LocalScript, and it will crash the client instead. However, if you give it a parent or don't run it from a LocalScript, it will crash the server. |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 27 Oct 2012 09:29 AM |
Okay.. I thought the default place where things created with Instance.new() was nil....
Ok. My mental logic just had a breakdown. |
|
|
| Report Abuse |
|
|