|
| 10 Jul 2014 04:35 AM |
Hi, my Player Points script for the invisible pad keeps looping to that player about 5-6 times within 1 player point each time. I don't want it looping, I want it so it gives the player 2 points. I have the script below and it might need to have a anti-loop or something to stop the looping, it just annoys me!
local Pts = script.Parent Pts.Touched:connect(function(part) local g = game.Players:GetPlayerFromCharacter(part.Parent) if part:IsA("Part") and (g) then pps = game:GetService("PointsService") if pps:GetAwardablePoints() >= 1 then pps:AwardPoints(g.userId, 1) wait(25) end end end) |
|
|
| Report Abuse |
|
|
| |
|
Lo202
|
  |
| Joined: 31 Jan 2013 |
| Total Posts: 579 |
|
| |
|
|
| 10 Jul 2014 05:44 AM |
| I don't know where to put a debounce, can anyone show me the debounce script? |
|
|
| Report Abuse |
|
|
Lo202
|
  |
| Joined: 31 Jan 2013 |
| Total Posts: 579 |
|
|
| 10 Jul 2014 05:51 AM |
| http://wiki.roblox.com/index.php?title=Scripting_Book/Chapter_6 |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2014 07:27 AM |
local DB = true
local Pts = script.Parent Pts.Touched:connect(function(part) local g = game.Players:GetPlayerFromCharacter(part.Parent) if part:IsA("Part") and (g) and DB then DB = false pps = game:GetService("PointsService") if pps:GetAwardablePoints() >= 1 then pps:AwardPoints(g.userId, 1) wait(25) DB = true end end end) |
|
|
| Report Abuse |
|
|