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: How Would I edit this

Previous Thread :: Next Thread 
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 09:08 PM
so its effects reverse after 30 seconds


function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil and h.WalkSpeed > 0 then
h.WalkSpeed = h.WalkSpeed - 2
end
end
script.Parent.Touched:connect(onTouched)

Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
26 Jun 2012 09:10 PM
Put a wait(30) and then just reverse all the effects.






~"If I win the lottery, the first thing I'm buying is an optical mouse"~
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 09:23 PM
tried it no work
Report Abuse
TheLuaTester is not online. TheLuaTester
Joined: 24 May 2012
Total Posts: 168
26 Jun 2012 09:28 PM
wait(30)
h.Walkspeed + 2


??? xO

-Tester-
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 09:29 PM
thats what I tried....
Report Abuse
WhiteRain is not online. WhiteRain
Joined: 24 Apr 2010
Total Posts: 2723
26 Jun 2012 09:32 PM
Does it work with the current code you have? If it does I have no idea why it wouldn't with a simple wait(30) and reversing it.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jun 2012 09:32 PM
*facepalm*

function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h and h.WalkSpeed ​> 0 then
h.WalkSpeed = h.WalkSpeed - 2
wait(30)
h.WalkSpeed = h.WalkSpeed + 2
end
end
script.Parent.Touched:connect(onTouched)

> † KMXD †
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 09:33 PM
i dunno either but that script somehow doesn't work.
Report Abuse
WhiteRain is not online. WhiteRain
Joined: 24 Apr 2010
Total Posts: 2723
26 Jun 2012 09:35 PM
This script is inside the brick to be touched right?
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 09:37 PM
its not a brick its a pellet from the Slingshot tol roblox has
Report Abuse
TheLuaTester is not online. TheLuaTester
Joined: 24 May 2012
Total Posts: 168
26 Jun 2012 09:37 PM
If the script isn't in the brick I will facepalm big time, this script looks like it should work...

-Tester-
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 09:38 PM
Well its in the brick This SHOULD work but its not
Report Abuse
TheLuaTester is not online. TheLuaTester
Joined: 24 May 2012
Total Posts: 168
26 Jun 2012 09:38 PM
function onTouched(hit) ?????? xO


-Tester-


btw, (not to be mean) a pellet is still a brick, derp
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 09:39 PM
FacePalm................
Report Abuse
WhiteRain is not online. WhiteRain
Joined: 24 Apr 2010
Total Posts: 2723
26 Jun 2012 09:40 PM
The pellets don't last long enough in game for the script to finish I think.
Try editing the script that deals with the removal of the projectiles to a longer time period or just lower the wait or add this bit of code next to where the damage code is in the actual tool script and not inside the pellet because I don't think that you even cloned this script to go inside the pellets.
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 09:40 PM
OH OH I get it okai
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jun 2012 09:40 PM
Is nothing happening? If the pellet is instanced into Workspace, did you clone the script to them?

> † KMXD †
Report Abuse
WhiteRain is not online. WhiteRain
Joined: 24 Apr 2010
Total Posts: 2723
26 Jun 2012 09:42 PM
@KMXD Probably not.
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 09:46 PM
still not working at this point can I just model it to you...
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 10:47 PM
Okay would this idea Work I copy the 1 damage script a bunch of time but each time At a script I put a Wait(x) b4 the script starts?
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 10:52 PM
ITTT WONT WORKKKKKK
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
26 Jun 2012 11:03 PM
Gonna fail but:
script.Source = string.reverse

Joke ^
To really fix:
Instance.new("ManualJointSurfaceInstance", workspace)
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 11:04 PM
Stupid question but Where do I put dat in da script
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
26 Jun 2012 11:12 PM
At the top.
Report Abuse
dasfunny is not online. dasfunny
Joined: 24 Jan 2011
Total Posts: 911
26 Jun 2012 11:19 PM
now it doesn't even work at all
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