NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 02 Mar 2013 02:43 PM |
This is another big problem I have with Roblox - there's no decent way to run a script on the player without some stupid problem like this.
Like in my "smash" game - only online - you get two cruisers popping up at first. Why? It's a simple script in a ScreenGui. |
|
|
| Report Abuse |
|
|
BAUER102
|
  |
| Joined: 03 Apr 2010 |
| Total Posts: 5936 |
|
|
| 02 Mar 2013 02:45 PM |
| Local script or normal script? |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
| |
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 02 Mar 2013 02:48 PM |
Try putting a bool value inside of the script, and put this at the top of the script.
local run = script:FindFirstChild("HasRun") if run ~= nil then if run.Value == true then error("Already ran the script", 0) end end
Only real way to fix it until the developers update roblox, and surprise us all by listening to the forums. |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 02 Mar 2013 02:50 PM |
| Ugh, I hate fixes like that. Roblox's sequencing is so bad that it's bound not to work anyway. |
|
|
| Report Abuse |
|
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 02 Mar 2013 02:53 PM |
Well, try it anyway. That or just use
repeat wait() until script:IsDescendantOf(game.Players)
then define the localplayer later. |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 02 Mar 2013 03:01 PM |
NVI, why are you being so bitter?
We're only kiddies. |
|
|
| Report Abuse |
|
|
HEAT507
|
  |
| Joined: 31 Aug 2012 |
| Total Posts: 429 |
|
|
| 02 Mar 2013 04:12 PM |
local bx=nil local v=nil if bx,v=~nil then return bx,v print('l0l fail'); |
|
|
| Report Abuse |
|
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 02 Mar 2013 04:13 PM |
| Heat, what does that even do? |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2013 04:24 PM |
Well, make the script create half a cruiser, then when the script executes twice, you'll have a full one. :D
~~~~Need a scripter? PM me. https://twitter.com/triston220Roblo ~~~~ |
|
|
| Report Abuse |
|
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 02 Mar 2013 04:25 PM |
| Wonderful triston. Just wonderful. |
|
|
| Report Abuse |
|
|
coplox
|
  |
| Joined: 07 Jun 2008 |
| Total Posts: 3252 |
|
|
| 02 Mar 2013 04:27 PM |
| Bottom line is, ROBLOX needs to feex der gaem |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2013 04:32 PM |
| I don't have this problem... Are you using a non-standard way of placing the LocalScripts in the PlayerGui? |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2013 04:43 PM |
I can confirm this is an issue (or at least it was). Here is a way to test:
Make a Localscript for the StarterGui which creates a value in the Workspace. You will get two values when you join. |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 02 Mar 2013 05:02 PM |
repeat wait(.03)until game:GetService'Players'.LocalPlayer.Character
ok |
|
|
| Report Abuse |
|
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 02 Mar 2013 05:05 PM |
| Doesn't work. It will run both at once. |
|
|
| Report Abuse |
|
|
coplox
|
  |
| Joined: 07 Jun 2008 |
| Total Posts: 3252 |
|
|
| 02 Mar 2013 05:06 PM |
I can think of a few hacks...
if math.random(0,1) then error("") end |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2013 05:30 PM |
What about putting script.Disabled = true and the end of the script?
~~~~Need a scripter? PM me. https://twitter.com/triston220Roblo ~~~~ |
|
|
| Report Abuse |
|
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 02 Mar 2013 05:42 PM |
| That might work, unless you had a while loop running. Then you'd run into a few problems. |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2013 06:11 PM |
| I've never had this problem, maybe it's the way you're coding it? |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 02 Mar 2013 10:48 PM |
| Nope. It's just in a ScreenGui. Go to my "smash" place, if you look carefully while online, you'll see two little cruisers being spawned. |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 02 Mar 2013 10:57 PM |
| I don't like it, it makes the page flash from the normal layout to the plugin layout. It's really disorienting. |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 02 Mar 2013 10:58 PM |
| I think you missed, DrHaximus. :P |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2013 10:58 PM |
| What if the blocks were the ones moving, and not the craft? |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 02 Mar 2013 10:59 PM |
| That might work, but I don't care enough about it to rewrite it. That still doesn't fix the problem, though, that just sidesteps it. |
|
|
| Report Abuse |
|
|