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 » Scripting Helpers
Home Search
 

Re: I would like to know if there are any auto walk scripts

Previous Thread :: Next Thread 
RoScripts is not online. RoScripts
Joined: 27 Oct 2012
Total Posts: 1824
08 Mar 2013 01:10 PM
I am planning to make a game, with an autowalk feature, where you click a GUI button and the player moves forward by itself.

Is this possible? If it is, how would you do it?
Report Abuse
TrollBay is not online. TrollBay
Joined: 04 Nov 2012
Total Posts: 217
08 Mar 2013 01:11 PM
[ Content Deleted ]
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
08 Mar 2013 01:13 PM
Do
player.Humanoid:MoveTo(player.Torso.CFrame.lookVector*steps)
With steps being the amount of steps forward, in studs.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
08 Mar 2013 01:13 PM
<.< A troll indeed.


use the MoveTo method on the humanoid of a character, and make 'nodes' for them to walk to.
Report Abuse
RoScripts is not online. RoScripts
Joined: 27 Oct 2012
Total Posts: 1824
08 Mar 2013 01:15 PM
@Render

I don't want the player to stop.

He can't stop.

I want the player to walk without an end.
Report Abuse
TrollBay is not online. TrollBay
Joined: 04 Nov 2012
Total Posts: 217
08 Mar 2013 01:16 PM
[ Content Deleted ]
Report Abuse
RoScripts is not online. RoScripts
Joined: 27 Oct 2012
Total Posts: 1824
08 Mar 2013 01:16 PM
Um, what's up with the filter?

And why are you dressed as me?
Report Abuse
TrollBay is not online. TrollBay
Joined: 04 Nov 2012
Total Posts: 217
08 Mar 2013 01:17 PM
[ Content Deleted ]
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
08 Mar 2013 01:18 PM
TrollBay, gtfo. We don't need trolling idiots like you here.
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
08 Mar 2013 01:18 PM
Ooh, hm. Do this.
local b = Instance.new("BodyVelocity",player.Torso)
b.maxForce=Vector3.new(16,1,16) --Might need a boost to ~20?
while wait() do
b.velocity=player.Torso.CFrame.lookVector*16 --With 16 being the walking speed
end

Only problem is if you turn, you will keep walking the same way for a little bit longer. And jumping might be a bit odd.
Report Abuse
RoScripts is not online. RoScripts
Joined: 27 Oct 2012
Total Posts: 1824
08 Mar 2013 01:20 PM
Thank you @ Render.

I'm going to check this out and see if I can edit it in any sort of way to satisfy my needs.

Just one more question, where does this script go?

In a tool?

In a player character?
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
08 Mar 2013 01:21 PM
The script should be inserted into the Character, but you will need to define player = script.Parent before you use the snippet above.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
08 Mar 2013 01:21 PM
Talk about the ROBLOX filter being a fail <.< TrollBay, get out. No one likes people like you. You're not being helpful, You're just being a dumb moron.
Report Abuse
RoScripts is not online. RoScripts
Joined: 27 Oct 2012
Total Posts: 1824
08 Mar 2013 01:28 PM
@Render

Alright I did this.

I inserted the script into Workspace and edited like this:

wait(5)

local b = Instance.new("BodyVelocity",game.Workspace.Player1.Torso)
b.maxForce=Vector3.new(16,1,16) --Might need a boost to ~20?
while wait() do
b.velocity=game.Workspace.Player1.Torso.CFrame.lookVector*16 --With 16 being the walking speed
end

Output doesn't say anything at all, and the script isn't working.

Any suggestions?
Report Abuse
RoScripts is not online. RoScripts
Joined: 27 Oct 2012
Total Posts: 1824
08 Mar 2013 01:31 PM
I also checked the Torso in the player and it has a BodyVelocity (Meaning the script is working correctly)

Somehow it's not making it move.
Report Abuse
RoScripts is not online. RoScripts
Joined: 27 Oct 2012
Total Posts: 1824
08 Mar 2013 01:47 PM
Bump.
Report Abuse
RoScripts is not online. RoScripts
Joined: 27 Oct 2012
Total Posts: 1824
08 Mar 2013 01:49 PM
Bump..
Report Abuse
RoScripts is not online. RoScripts
Joined: 27 Oct 2012
Total Posts: 1824
08 Mar 2013 03:15 PM
Um
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
08 Mar 2013 04:16 PM
Hm, you could increase the force of the BodyVelocity?

If your character isn't going to get drawn by a mystic power over stones and trees, stumbling and hitting it's head into the ground, getting hunted by angry dogs, roll in a bush and continue to get drawn by the power of BodyVelocity, then I really don't know what's wrong.



Otherwise, you could loop an offset on :MoveTo? Hm, and force-equip a tool that will destroy itself in order to prevent moving with the cursor. Oh, and remove the HumanoidController in the ControllerService to 100% block movements. INSTA-WIN! MOVE CHARACTER!


- As, are you getting hyper? No, I'm just... what am I?
Report Abuse
BJJScrambler is not online. BJJScrambler
Joined: 13 Jan 2013
Total Posts: 898
08 Mar 2013 04:23 PM
Use the MoveTo() method in the Humanoid. This method tells a humanoid to walk to a certain point and is how are characters already move so there will be no difference.


http://wiki.roblox.com/index.php/MoveTo_(Method)/humanoid
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
08 Mar 2013 04:24 PM
@BJJ

Though with that method, you would also have to specify a part.

¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
08 Mar 2013 04:32 PM
workspace.Terrain ^



- As, in-in-in-instaaaaaaaaa-cake!
Report Abuse
BJJScrambler is not online. BJJScrambler
Joined: 13 Jan 2013
Total Posts: 898
08 Mar 2013 04:32 PM
@Knightmare

Which is not a difficult thing to do. The link I gave should give him all the information needed.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
08 Mar 2013 04:45 PM
I assumed it wasn't towards only one spot, and I thought it would be a little inconvenient. Though As brings up a good point with Terrain, I didn't know it extends BasePart.

¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
08 Mar 2013 05:46 PM
Ok, let's end this madnesshhh.

Ty for giving me a name, I will use it the r... oh, I've used it in all my ziggies D:
-------------------------------------------------------------

LocalScript:
-------------------------------------------------------------

function waitForChild(instance, name)
if instance:FindFirstChild(name) then
return instance:FindFirstChild(name)
end
repeat wait() until instance:FindFirstChild(name)
return instance:FindFirstChild(name)
end

function waitForProperty(instance, name)
if instance[name] then
return instance[name]
end
repeat wait() until instance[name]
return instance[name]
end

local plr = waitForProperty(game:service("Players"), "LocalPlayer")
-- I tried to force-equip a tool. Didn't work well, crashed some corescripts 3:
-- Meep, another comment line 8D I waz here D:

function clearControl()
for _,c in pairs(game:service("ControllerService"):GetChildren()) do
c:Destroy()
end
end

clearControl()

function instaMove(hum)
coroutine.wrap(function()
while true do
if not hum then return end
local pos = CFrame.new(0, 0, 0)
if hum.Torso then
pos = hum.Torso.CFrame
end
hum:MoveTo((pos + pos.lookVector * 200).p, waitForProperty(workspace, "Terrain"))
wait(0.05)
end
end)()
end

function instaChar(chr)
while true do
for _,c in pairs(chr:GetChildren()) do
if c:IsA("Humanoid") then
instaMove(c)
end
end
chr.ChildAdded:wait()
end
end

plr.CharacterAdded:connect(function() instaChar(plr.Character) end)
instaChar(waitForProperty(plr, "Character"))
-------------------------------------------------------------


Sorry for removing the force-equip part 3: I tried both tool & hopperbin (you cannot force-equip hopperbins anymore, sadly... byebye AUTO green-dot-removal & mouse-icon-switcher)


- As, I'm not happy. I had to actually TEST this code before posting it here!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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