|
| 22 Jun 2015 04:51 AM |
player = game.Players.LocalPlayer char = player.Character mouse = player:GetMouse() torso = char:WaitForChild("Torso") running = false partMade = false
function OraMaker() MainPart = Instance.new("Part") MainPart.TopSurface = 0 MainPart.BottomSurface = 0 MainPart.Size = Vector3.new(2,2,2) MainPart.CanCollide = false MainPart.Name = player.Name.."s:".."MainPart" MainPart.Parent = workspace end
function mover() a = 0 while running == true do wait() MainPart.CFrame = torso.CFrame end
end
function Clicked() if running == false then running = true if partMade == false then partMade = true OraMaker() else end mover() else running = false end end
mouse.Button1Down:connect(Clicked)
it works but the mainpart Slowly falls to the void. i tested like this while wait() do script.Parent.CFrame = game.wokspace.Test.CFrame end the part was made the same way as the other part so why does the part in this script fall to the void if some 1 could help me fix this problem it would be nice
|
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 22 Jun 2015 04:54 AM |
| torso = char:FindFirstChild("Torso") |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 22 Jun 2015 04:56 AM |
| WaitForChild is literally waiting for the child. It doesn't grab anything. |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2015 05:06 AM |
@DrSaint i removed it and set it to this while running == true and wait() do MainPart.CFrame = char.Torso.CFrame end but it still fall to the void |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2015 05:14 AM |
LMAO the times when u see a simple mistake. I for Got to Anchor it lmao. |
|
|
| Report Abuse |
|
|
DrSaint
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
| |
|
|
| 22 Jun 2015 05:31 AM |
print(game.Workspace:WaitForChild("Part") == game.Workspace:FindFirstChild("Part"))
--> true |
|
|
| Report Abuse |
|
|