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: Script Not Working (at least how it was supposed to)

Previous Thread :: Next Thread 
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 01:50 PM
Brick = script.Parent function OnTouch() local player = game.Players.LocalPlayer local torso = player.Character.HumanoidRootPart for i=1,10, .01 do wait(1) Brick.CFrame = Brick.CFrame + Vector3.new(0, i, 0) torso.CFrame = torso.CFrame + ################## break end end Brick.Touched:connect(OnTouch) That Is My Script It Is Suppost To Take "Brick" And move it up y+10 but it only moves it up y+0.1
Report Abuse
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 01:50 PM
Brick = script.Parent function OnTouch() local player = game.Players.LocalPlayer local torso = player.Character.HumanoidRootPart for i=1,10, .01 do wait(1) Brick.CFrame = Brick.CFrame + Vector3.new(0, i, 0) torso.CFrame = torso.CFrame + ################## break end end Brick.Touched:connect(OnTouch)
Report Abuse
Goadan is not online. Goadan
Joined: 14 Apr 2013
Total Posts: 157
16 May 2017 01:52 PM
So explain what its suppose to do , People cant look at a chunk of text like that with no line breaks and understand what it does,


Report Abuse
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 01:52 PM
Wait Ima try and post it again in proper format: Brick = script.Parent function OnTouch() local player = game.Players.LocalPlayer local torso = player.Character.HumanoidRootPart for i=1,10, .01 do wait(1) Brick.CFrame = Brick.CFrame + Vector3.new(0, i, 0) torso.CFrame = torso.CFrame + ################## break end end Brick.Touched:connect(OnTouch)
Report Abuse
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 01:53 PM
Let me try now: Brick = script.Parent function OnTouch() local player = game.Players.LocalPlayer local torso = player.Character.HumanoidRootPart for i=1,10, .01 do wait(1) Brick.CFrame = Brick.CFrame + Vector3.new(0, i, 0) torso.CFrame = torso.CFrame + ################## break end end Brick.Touched:connect(OnTouch)
Report Abuse
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 01:54 PM
ok i give up


Report Abuse
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 01:56 PM
######################## I took a screen shot of it
Report Abuse
edenDeden is not online. edenDeden
Joined: 29 Jul 2016
Total Posts: 370
16 May 2017 01:59 PM
is this a script or a local script?


Report Abuse
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 02:04 PM
Script


Report Abuse
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 02:05 PM
I'ma try posting the code 1 more time Brick = script.Parent function OnTouch() local player = game.Players.LocalPlayer local torso = player.Character.HumanoidRootPart for i=1,10, .01 do wait(1) Brick.CFrame = Brick.CFrame + Vector3.new(0, i, 0) torso.CFrame = torso.CFrame + ################## break end end Brick.Touched:connect(OnTouch) --
Report Abuse
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 02:05 PM
>:(


Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
16 May 2017 02:06 PM
It's not formatting cause of the censor


Make a goo.gl link
Report Abuse
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 02:06 PM
##################### here is a screen shot of the code
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
16 May 2017 02:07 PM
Bruh just make a google link...



Remove the https://

Report Abuse
Super73706 is not online. Super73706
Joined: 31 Mar 2017
Total Posts: 112
16 May 2017 02:08 PM
goo.gl/2wFh15


Report Abuse
Proxinable is not online. Proxinable
Joined: 12 Sep 2011
Total Posts: 395
16 May 2017 02:22 PM
1. game.Players.LocalPlayer only works correctly when used in LocalScripts. This should produce an error in the output window, which you should have open when testing your scripts.

Get the player with game.Players:GetPlayerFromCharacter(part.Parent) with part being the object triggering the event.

2. If you put a break in your for loop outside of a conditional check there is no point having the loop. The break keyword ends the loop.
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
16 May 2017 02:23 PM
Your loop goes like this:

1
1.01
1.02
1.03
1.04
1.05

That's what it's doing


I can't really say how to FIX it because I have no idea what you're doing


Use multiplication or something, idk
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