|
| 28 Sep 2013 12:31 PM |
Hello everyone,
I'm trying to make a game where you control something other than your avatar as your main player. In fact, I'd prefer you not be able to use your normal avatar at all.
I tried something like:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character = game.Workspace.Cube end) end)
However, that doesn't do anything. I know how to make your avatar not auto-spawn, but I'm basically stuck.
Any ideas how I would accomplish this? Thanks in advance. |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
|
| 28 Sep 2013 12:33 PM |
Well.. I have something like that at one of my project places. Let me find you a sample of the script, hang on. |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
|
| 28 Sep 2013 12:37 PM |
local c=Instance.new "Part" c.Parent=game.Workspace c.Position=Vector3.new(0,100,0) c.Anchored=true c.Transparency=1 c.CanCollide=false c.Name=(name.."cam") mouse = game.Players.LocalPlayer:GetMouse() mouse.TargetFilter=c
if key=="s" then--MoveSouth sdown=true while sdown do c.Position=c.Position+Vector3.new(0,0,(speed)) wait(.001)end end--MoveSouth end if key=="w" then wdown=true while wdown do c.Position=c.Position-Vector3.new(0,0,(speed)) wait(.001) end end if key=="d" then ddown=true while ddown do c.Position=c.Position+Vector3.new((speed),0,0) wait(.001) end end if key=="a" then adown=true while adown do c.Position=c.Position-Vector3.new((speed),0,0) wait(.001) end end
Just set camerasubject to c and add a keyup function |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2013 12:39 PM |
| You could just make your entire character invisible and weld the parts you want to onto your character :U |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2013 12:41 PM |
wow just solved my problem with that as well
As one might say,killing 2 birds with one stone
Or helping 2 robloxians with 1 script
idk I'm bad at metaphors |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2013 01:22 PM |
| Thanks janthran I'll see what I can do with this! |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
| |
|