generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Could i have some help with a script

Previous Thread :: Next Thread 
omegashawn123 is not online. omegashawn123
Joined: 27 Sep 2013
Total Posts: 269
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 is not online. DrSaint
Joined: 14 Oct 2009
Total Posts: 18429
22 Jun 2015 04:54 AM
torso = char:FindFirstChild("Torso")
Report Abuse
DrSaint is not online. 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
omegashawn123 is not online. omegashawn123
Joined: 27 Sep 2013
Total Posts: 269
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
omegashawn123 is not online. omegashawn123
Joined: 27 Sep 2013
Total Posts: 269
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 is not online. DrSaint
Joined: 14 Oct 2009
Total Posts: 18429
22 Jun 2015 05:15 AM
Cody. Help needed.
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
22 Jun 2015 05:31 AM
print(game.Workspace:WaitForChild("Part") == game.Workspace:FindFirstChild("Part"))

--> true
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image