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
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 1901 |
|
| |
|
|
| 02 Jul 2014 10:11 AM |
Try it on a phisical server.
- xXScriptzXx |
|
|
| Report Abuse |
|
|
|
| 02 Jul 2014 10:11 AM |
| Are you touching it before press before the 100 seconds are complete?. |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 1901 |
|
| |
|
cokePanda
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 1901 |
|
| |
|
| |
|
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 |
|
|
|
| 02 Jul 2014 01:25 PM |
| Ohh, its cuz of PP being low. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 02 Jul 2014 01:57 PM |
| Hmm, add a wait() after press = true |
|
|
| Report Abuse |
|
|
cokePanda
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 1901 |
|
|
| 02 Jul 2014 02:10 PM |
| In which one of those scripts? |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|