|
| 28 Aug 2011 03:31 PM |
Hmm... why isint this working?
game.Players.PlayerAdded:connect(function(dude) if game.Players.dude.Character:findFirstChild("Head") then e = Instance.new("Part") e.Parent = game.Workspace e.Position = dude.Character.Head.Position if dude.Character.Head.Position + Vector3.new(1, 0, 0) or Vector3.new(0, 1, 0) or Vector3.new(0, 0, 1) then e.Position = dude.Character.Head.Position end end end)
|
|
|
| Report Abuse |
|
|
|
| 28 Aug 2011 03:36 PM |
I don't see anything wrong, but it might be this line:
if dude.Character.Head.Position + Vector3.new(1, 0, 0) or Vector3.new(0, 1, 0) or Vector3.new(0, 0, 1) then
Any output at all? |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 28 Aug 2011 03:36 PM |
if dude.Character.Head.Position + Vector3.new(1, 0, 0) or Vector3.new(0, 1, 0) or Vector3.new(0, 0, 1) then
That line will always be true; will always add 1,0,0. |
|
|
| Report Abuse |
|
|
|
| 28 Aug 2011 03:40 PM |
| the problom is the brick ising showing up. idk whats wrong with it. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 29 Aug 2011 09:43 AM |
you can just do
dude.Character:findFirstChild("Head")
and not
game.Players.dude.Character:findFirstChild("Head")
because that would be trying to find someone on the game named dude, and 'dude' is actually the argument for newPlayer, but you can use whatever you want. |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2011 09:43 AM |
| Umm... i dont unsterstand what your saying. just add that after the funtion? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 29 Aug 2011 10:09 AM |
game.Players.PlayerAdded:connect(function(dude) if dude.Character:findFirstChild("Head") then e = Instance.new("Part") e.Parent = game.Workspace e.Position = dude.Character.Head.Position end end) |
|
|
| Report Abuse |
|
|
Munno
|
  |
| Joined: 06 Oct 2008 |
| Total Posts: 2784 |
|
|
| 29 Aug 2011 10:09 AM |
game.Players.PlayerAdded:connect(function(dude) if dude.Character:findFirstChild("Head") then e = Instance.new("Part") e.Parent = game.Workspace e.Position = dude.Character.Head.Position if dude.Character.Head.Position + Vector3.new(1, 0, 0) or Vector3.new(0, 1, 0) or Vector3.new(0, 0, 1) then e.Position = dude.Character.Head.Position end end end)
On line 2 you were trying to call a player called dude, not the other thingy.
Friend of a friend of RLR .::LURK MOAR::. |
|
|
| Report Abuse |
|
|
| |
|
Munno
|
  |
| Joined: 06 Oct 2008 |
| Total Posts: 2784 |
|
|
| 29 Aug 2011 10:26 AM |
You also can't set a parts position directly, you need to use a Vector3.
or at least, so I'm told.
Friend of a friend of RLR .::LURK MOAR::. |
|
|
| Report Abuse |
|
|
Spectrumz
|
  |
| Joined: 22 Mar 2011 |
| Total Posts: 4338 |
|
|
| 29 Aug 2011 10:28 AM |
game.Players.PlayerAdded:connect(function(dude) repeat wait() until dude.Character if dude.Character:findFirstChild("Head") then local e = Instance.new("Part", game.Workspace) e.Position = dude.Character.Head.Position end end)
i winned |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2011 10:28 AM |
Why didn't anyone listen to swmaniac? The problem is here:
if dude.Character.Head.Position + Vector3.new(1, 0, 0) or Vector3.new(0, 1, 0) or Vector3.new(0, 0, 1) then
You need to explain this line.
Also, that is incorrect syntax for the or operator. |
|
|
| Report Abuse |
|
|
| |
|
Spectrumz
|
  |
| Joined: 22 Mar 2011 |
| Total Posts: 4338 |
|
|
| 29 Aug 2011 10:31 AM |
| y u guyz no wait for character |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2011 10:35 AM |
| The problom now is its not following him. |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Aug 2011 07:46 AM |
game.Players.PlayerAdded:connect(function(dude) dude.CharacterAdded:connect(function () local e = Instance.new("Part", game.Workspace) while wait() do e.Position = dude.Character.Head.Position end end) end) |
|
|
| Report Abuse |
|
|
Wil2
|
  |
| Joined: 01 Feb 2008 |
| Total Posts: 728 |
|
|
| 30 Aug 2011 08:56 AM |
game.Players.PlayerAdded:connect(function(dude) if game.Players.dude.Character:findFirstChild("Head") then e = Instance.new("Part") e.Parent = game.Workspace e.Position = dude.Character.Head.Position if dude.Character.Head.Position + Vector3.new(1, 0, 0) or Vector3.new(0, 1, 0) or Vector3.new(0, 0, 1) then e.Position = dude.Character.Head.Position end end end) game.Players.PlayerAdded:connect(function(pers) repeat if pers.Character == nil then wait() end until pers.Character ~= nil repeat if pers.Character:findFirstChild("Head") then e = Instance.new("Part",workspace) e.CFrame = pers.Character.Head.CFrame e.CanCollide = false e.Anchored = true end until false end) |
|
|
| Report Abuse |
|
|
Wil2
|
  |
| Joined: 01 Feb 2008 |
| Total Posts: 728 |
|
|
| 30 Aug 2011 08:57 AM |
woops forgot a line before the: end umtil false end) and under e.Anchored = true, the line is: wait(1) e:remove() |
|
|
| Report Abuse |
|
|