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: one problom with the script

Previous Thread :: Next Thread 
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 04:42 PM
trying to make a bed that heals you slowly, when u go on the bed it heals you like i wanted it to but when u jump off the bed ur still getting heal i want the healing to stop when u jump off the bed and the bed is a seat that heals you

heres the script code

function onTouched(part)
while true do
wait(0.3)

local h = part.Parent:findFirstChild("Humanoid")
if (h ~=nil) then
h.Health = h.Health + 0.1
end
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 05:56 PM
Bump0
Report Abuse
KiwiTronik is not online. KiwiTronik
Joined: 18 Feb 2010
Total Posts: 3221
22 Jun 2014 05:58 PM
.Touched
.TouchedEnded


~I'm an Angry Llama~
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 06:09 PM
you never siad where to put it in the script it dosent help
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
22 Jun 2014 06:12 PM
local heal = false
function onTouched(part)
heal = true
while heal do
wait(0.3)
local h = part.Parent:findFirstChild("Humanoid")
if (h ~=nil) then
h.Health = h.Health + 0.1
end
end
end
function TouchStop()
healing = false
end
script.Parent.Touched:connect(onTouched)
script.Parent.TouchedEnded:connect(TouchStop)
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 06:17 PM
it still dosnt work it still heals you when ur off the Seat that heals you
Report Abuse
VisualGraphics is not online. VisualGraphics
Joined: 26 Nov 2010
Total Posts: 6515
22 Jun 2014 06:20 PM
function onTouched(part)
while true do
wait(0.3)
local h = part.Parent:FindFirstChild("Humanoid")
if (h ~=nil) then
h.Health = h.Health + 0.1
else if h.Jump then
h.Health = h.Health + 0
end
end
end
end

script.Parent.Touched:connect(onTouched)

idk
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 06:27 PM
still dosnt work
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
22 Jun 2014 06:29 PM
Then make youre own script
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 06:34 PM
and this keeps happening i did evrething i could so i came here
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
22 Jun 2014 06:35 PM
'everything'
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 06:42 PM
no matter whay i do it still heals you when your off of the seat
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 06:43 PM
also ignore my grammar keyboard is mest up
Report Abuse
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
22 Jun 2014 06:46 PM
LOL NUBZ!


local heal = false
function onTouched(part)
heal = true
while heal do
wait(0.3)
local h = part.Parent:findFirstChild("Humanoid")
if (h ~=nil) then
h.Health = h.Health + 0.1
end
end
end
function TouchStop()
heal = false -- IT SAID HEALING LAMFOWMFLAWDAOWNDAEW HAHAHA XD k bye
end
script.Parent.Touched:connect(onTouched)
script.Parent.TouchedEnded:connect(TouchStop)
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 06:53 PM
still keeps healing when your off the bed seat
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
22 Jun 2014 07:05 PM
lol
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 07:09 PM
ive been trying to fix it for more then 2 months
and now it lookes like even most scripters cant even fix this now
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
22 Jun 2014 07:12 PM
Did you try debouncing it?
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 07:15 PM
i did in 2 different ways it wasnt even working anymore when i did
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
22 Jun 2014 07:18 PM
Hmmm. When you sit, isn't there a SeatWeld? ;)
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
22 Jun 2014 07:22 PM
it's cause you're putting the debounces in the wrong spots. When you do that, it doesn't work.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
22 Jun 2014 07:24 PM
script.Parent.Touched:connect(function(part)
local h = part.Parent:findFirstChild("Humanoid")
if (h ~=nil) then
local D = Instance.new("BoolValue", h)
D.Name = "Healing"
while D do
wait(.3)
h.Health = h.Health + 0.1
end
end
end)

script.Parent.TouchEnded:connect(function(part)
local D = part.Parent:FindFirstChild("Humanoid"):FindFirstChild("Healing")
if D then D:Destroy() end
end)


--Have fun.
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 07:34 PM
and it still keeps healing when you jump off the seat
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
22 Jun 2014 07:36 PM
Dont robloxians heal automatically?
Report Abuse
freiza567 is not online. freiza567
Joined: 07 Aug 2010
Total Posts: 103
22 Jun 2014 07:38 PM
yes but i added a script in my game to stop the human regen
now if pepole dont notice its not a brick i have to go on its a seat
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