|
| 01 May 2014 11:43 AM |
plr.CharacterAdded:connect(function(character) char=plr.Character cc=game.Workspace.CurrentCamera c1=char:GetChildren() Instance.new("Model",cc).Name=char.Name c2=cc[char.Name]:GetChildren() for i,v in ipairs (c1) do if v:IsA("Part") and v.Name~="HumanoidRootPart" then v:Clone().Parent=cc[char.Name] end end for i,v in ipairs (c2) do w=Instance.new("Weld",game.JointsService) w.C1=v.CFrame:toObjectSpace(char[v.Name].CFrame) w.Part0=char[v.Name] w.Part1=v end print("Character Loaded") plr.CameraMode=Enum.CameraMode.LockFirstPerson end
The script doesn't even create a weld, why? o.o
~masterCameron101, advanced Lua programmer, certified graphics designer and geek~ |
|
|
| Report Abuse |
|
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
|
| 01 May 2014 12:47 PM |
'~masterCameron101, advanced Lua programmer, ' ..
sorry i think your too advanced for help |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 01 May 2014 12:52 PM |
| I'm guessing this is a localscript. Why do you need the player.CharacterAdded event? Odds are that the Character is already there before the LocalScript even LOADS. |
|
|
| Report Abuse |
|
|
|
| 01 May 2014 12:55 PM |
| make it check if a character with health above 0 is there, if so, run the script. if not, use repeat wait() until character and then run the script. |
|
|
| Report Abuse |
|
|
|
| 02 May 2014 08:40 AM |
@Translate Advanced users do need help... they're not always going to solve their own errors 100% of the time.
@wazap Localscripts error too. the client opens, loads the game, player loads, error: character = nil, then character loads.
@SenseiWarrior It does it right when the character spawns so there's no need.
~masterCameron101, advanced Lua programmer, certified graphics designer and geek~ |
|
|
| Report Abuse |
|
|
|
| 02 May 2014 09:37 AM |
w=Instance.new("Weld",game.JointsService) w.Part0=char[v.Name] w.Part1=v w.C1=v.CFrame:toObjectSpace(char[v.Name].CFrame)
try this i am not sure it will change anything but its worth a try |
|
|
| Report Abuse |
|
|
|
| 02 May 2014 09:45 AM |
Outdated code...
~masterCameron101, advanced Lua programmer, certified graphics designer and geek~ |
|
|
| Report Abuse |
|
|