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: Scripts Break NEED ANSWERS WHY (?)

Previous Thread :: Next Thread 
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
02 Jul 2014 09:52 AM
local press = false
local pointgiver = script.Parent --change part to name the name of the part
pointgiver.Touched:connect(function(pointgiver)--change part to the name of the part
if not press then
press = true
local g = game.Players:GetPlayerFromCharacter(pointgiver.Parent)
if pointgiver:IsA("Part") and (g) then --Makes sure the part is a part
pps = game:GetService("PointsService")--Declares the point service
if pps:GetAwardablePoints() >= 1 then --change 1 to how much points you get for touching the part
local plr = pointgiver.Parent:findFirstChild("Humanoid")
if plr.Health == 100 then
wait(100)
pps:AwardPoints(g.userId, 10) --doesent matter
press = false
end
end
end
end
end)

------ The above script breaks after hitting it a few times, when I'm testing it on wait(1), I need some ways of fixing it, and I can't figure those myself...



enabled = true
function onTouched(hit)
if not enabled then return end
enabled = false
local h = hit.Parent:findFirstChild("Humanoid")
if (h ~= nil) then
h.Sit = true
end
enabled = true
end
script.Parent.Touched:connect(onTouched)

---------- The above script also seems to break after testing it.. This might have an issue with debounce, which probably requires a wait(), but are there any other issues with this?



Thanks guys, really helpful some of you here :)
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
02 Jul 2014 10:03 AM
bump up
Report Abuse
wtfsamcrap is not online. wtfsamcrap
Joined: 13 Jan 2013
Total Posts: 509
02 Jul 2014 10:11 AM
Try it on a phisical server.

- xXScriptzXx
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
02 Jul 2014 10:11 AM
Are you touching it before press before the 100 seconds are complete?.
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
02 Jul 2014 10:14 AM
When I test it, I do it at 1 second wait.
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
02 Jul 2014 10:24 AM
bump up
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
02 Jul 2014 10:34 AM
Anyone? :|
Report Abuse
wtfsamcrap is not online. wtfsamcrap
Joined: 13 Jan 2013
Total Posts: 509
02 Jul 2014 11:39 AM
I already said..
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
02 Jul 2014 12:07 PM
I even tried it with real players, still same thing happens.
Report Abuse
wtfsamcrap is not online. wtfsamcrap
Joined: 13 Jan 2013
Total Posts: 509
02 Jul 2014 01:25 PM
Ohh, its cuz of PP being low.
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
02 Jul 2014 01:53 PM
It's 10k at the place I am testing it in...
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
02 Jul 2014 01:57 PM
Hmm, add a wait() after press = true
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
02 Jul 2014 02:10 PM
In which one of those scripts?
Report Abuse
wtfsamcrap is not online. wtfsamcrap
Joined: 13 Jan 2013
Total Posts: 509
02 Jul 2014 02:33 PM
Oh, I found out a way to fix!
Step 1. If your on windows, Press CTRL - A
Step 2. Type Debug
Step 3. Save your place.
Step 4. Go in your game, then press F9
Step 5. Find were it says TLREOLL:
That will show you the part with the error :D
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
02 Jul 2014 02:47 PM
bump up,

I think I found a way to fix the first script, I'm still wondering what might be wrong with the killing script if a player is standing...
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