|
| 17 May 2014 01:11 AM |
im trying to make it so your camera is rotating around a part while your character is removed as soon as you join the game
here's what i have
--Main Script
game.Players.PlayerAdded:connect(function(p) c = script.LocalScript:clone() c.Disabled = false c.Parent = p.PlayerGui wait() p.Character() end)
--Local Script
local target = workspace.camSubject local camera = workspace.CurrentCamera camera.CameraSubject = target local angle = 0
while wait() do camera.CoordinateFrame = CFrame.new(target.Position) * CFrame.Angles(0,angle,0) * CFrame.new(0,-5,0) angle = angle + math.rad(1) end |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 01:27 AM |
| Change cameratype to scriptable for during rotation. |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 May 2014 03:06 AM |
| You never stated the problem |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 11:37 AM |
nothing happens thats my problem |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 12:46 PM |
I tested your camera script, and it doesn't rotate. It just stays on the brick, not roating, and not moving. Try viewing the player's head as a target. I fixed your not working problem, but when the character's removed, the camera gets stuck in one spot, and the camera script stays on the brick, and doesn't move, and can't be moved. But, you can easily solve this by just making the player invisible.
Use for the main script. Put the localscript inside the main script:
Game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) script.LocalScript:Clone().Parent = character player.Character.Torso.Transparency = 1 player.Character.Head.TramsParency = 1 player.Character.RightArm.Transparency = 1 player.Character.LeftArm.Transparency = 1 player.Character.LeftLeg.Tramsparency = 1 player.Character.RightLeg.Transparency = 1 player.Character.Humanoid.WalkSpeed = 0 end) end)
For the local script:
local Targ = Game.Players.LocalPlayer.Character.Head local Cam = Game.Workspace.CurrentCamera Cam.CameraSubject = Targ Spin = 3 while wait() do Cam.CoordinateFrame = CFrame.new(Targ.Position) * CFrame.Angles(2,Spin,4) * CFrame.new(0,-5,0) Spin = Spin + math.rad(1) |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 12:47 PM |
| Oops. Be sure toadd an end after the cam script. I forgot to put an end for the while wait() do. |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 12:48 PM |
DON'T USE THE SCRIPTS ABOVE. USE THESE ONES.
Use for the main script. Put the localscript inside the main script:
Game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) script.LocalScript:Clone().Parent = player.PlayerGui player.Character.Torso.Transparency = 1 player.Character.Head.Transparency = 1 player.Character:FindFirstChild("Right Arm").Transparency = 1 player.Character:FindFirstChild("Left Arm").Transparency = 1 player.Character:FindFirstChild("Left Leg").Transparency = 1 player.Character:FindFirstChild("Right Leg").Transparency = 1 player.Character.Humanoid.WalkSpeed = 0 end) end)
For the local script:
local Targ = Game.Players.LocalPlayer.Character.Head local Cam = Game.Workspace.CurrentCamera Cam.CameraSubject = Targ Spin = 3 while wait() do Cam.CoordinateFrame = CFrame.new(Targ.Position) * CFrame.Angles(2,Spin,4) * CFrame.new(0,-5,0) Spin = Spin + math.rad(1) |
|
|
| Report Abuse |
|
|