BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 27 Feb 2014 11:48 AM |
So, I cannot figure this out.
I have a Local Script in StarterGui that clones a model from Lighting and places it in your Camera (so it is not seen and cannot be interacted with by other players). Then, the Local Script enables a script within the cloned model which "TranslateBy"'s the model in a certain direction.
It works fine in PlaySolo, but not in Start Server > Start Player
There are no errors anywhere.
From this information, can you tell me what I am doing wrong here, or do you need to see the script?
Thanks, -Bogy |
|
|
| Report Abuse |
|
|
Vexedly
|
  |
| Joined: 15 Sep 2006 |
| Total Posts: 7011 |
|
| |
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 27 Feb 2014 11:50 AM |
Local Script: --------------------------------------------- jet01 = game.Lighting.Jet01:Clone() jet01.Parent = workspace.CurrentCamera jet01.Move.Disabled = false ---------------------------------------------
Disabled Script in Model: --------------------------------------------- while wait() do script.Parent:TranslateBy(Vector3.new(5,-0.2,0)) end ---------------------------------------------
|
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 27 Feb 2014 11:54 AM |
| Is the while loop in a local script? |
|
|
| Report Abuse |
|
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 27 Feb 2014 11:55 AM |
| Negative. The Script in the "Jet01" model is not Local. |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 27 Feb 2014 12:02 PM |
| Make it local then Start Server> Start Player |
|
|
| Report Abuse |
|
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
| |
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
| |
|
|
| 27 Feb 2014 12:31 PM |
Put the while loop in the same script that clones it,right after it clones it(I don't think scripts in models,block,etc can run in the camera..)
So like StarterGui -LocalScript Lighting -Jet
--blablah,clone the jet .Parent = Workspace.CurrentCamera --add the while loop here,refrencing to the clone of the jet |
|
|
| Report Abuse |
|
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 27 Feb 2014 12:34 PM |
| Alright. I'll test it out, hold on... |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 27 Feb 2014 12:37 PM |
| Scripts don't run in Camera. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 12:37 PM |
So an example: StarterGui -LocalScript Lighting -Model --Part
m = game.Lighting.Model:clone() m.Parent = Workspace.CurrentCamera while wait() do m.Part.CFrame = m.Part.CFrame*CFrame.Angles(0,0.1,0) end
--this will make the part spin around and around :) This is just an example |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 12:38 PM |
Like trix said,scripts don't run in the camera /\_/\ But I said it first XD |
|
|
| Report Abuse |
|
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 27 Feb 2014 12:40 PM |
Same thing, doesn't move. Script:
jet01 = game.Lighting.Jet01:Clone() jet01.Parent = workspace.CurrentCamera distanceFromStart01 = 0 repeat wait() jet01:TranslateBy(Vector3.new(5,-0.2,0)) distanceFromStart01 = distanceFromStart01 + 1 until distanceFromStart01 >= 50
I don't think it has anything to do with communication. I think there is some reason why TranslateBy() doesn't work in while being a descendant of a Camera Object, or something weird like that.
._. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 12:43 PM |
Hmm Maybe use CFraming for the jet Like (The pieces are all attached right?) Jet.MainPart.CFrame = Jet.MainPart.CFrame*CFrame.new(5,-0.2,0) |
|
|
| Report Abuse |
|
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 27 Feb 2014 12:46 PM |
| The model I am moving is Anchored. I don't know if moving the Central Part of a model will work. I can try though. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 12:46 PM |
| Try changing the script in your model to a LocalScript. |
|
|
| Report Abuse |
|
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 27 Feb 2014 12:48 PM |
| @Agent, already tried that. The problem does not lie with the script itself. I have already moved the coding over to the core script that does all the work. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 12:49 PM |
/\ He already tried that,so were attempting to add it INTO the current localscript.. And TranslateBy doesn't seem to be working.. Maybe Jet:MoveTo(Jet.MainPart.CFrame*CFrame.new(5,-0.2,0) Or Jet:MoveTo(Jet.MainPart.Position+Vector3.new(5,0.2,0) Also,body velocity might be a good idea,instead of that..idk |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 12:50 PM |
Ok,dumb question time: Output? |
|
|
| Report Abuse |
|
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 27 Feb 2014 12:52 PM |
Darn, this is so frustrating! Same result with this script:
jet01 = game.Lighting.Jet01:Clone() jet01.Parent = workspace.CurrentCamera jet01.PrimaryPart = jet01.MoveToPart distanceFromStart01 = 0 repeat wait() jet01.PrimaryPart.CFrame = jet01.PrimaryPart.CFrame*CFrame.new(5,-0.2,0) istanceFromStart01 = distanceFromStart01 + 1 until distanceFromStart01 >= 50
Also, I don't think MoveTo will work. The reason why I went with TranslateBy in the first place is because MoveTo was EXTREMELY glitchy and messed everything up. |
|
|
| Report Abuse |
|
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 27 Feb 2014 12:52 PM |
| And no errors whatsoever. Everything is fine. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 12:55 PM |
UGH ROBLOX Y U DO DIS??? UGHHH Ok,last attempt here(maybe) Unanchor it,put a bodyvelocity in it with the velocity of: Vector3.new(5,2,0) Lighting -Jet --MainPart ---BodyVelocity |
|
|
| Report Abuse |
|
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 27 Feb 2014 12:58 PM |
| I might use BodyPosition. Brb, gonna try it. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 01:01 PM |
BodyPosition sets the position in mid air..instant BodyVelocity propells it BodyThrust does same thing as bv but..it thrusts once,and then is gone,that kinda thing |
|
|
| Report Abuse |
|
|