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: OnTouch Script Activation

Previous Thread :: Next Thread 
ThatBrickWithGlasses is not online. ThatBrickWithGlasses
Joined: 03 Aug 2011
Total Posts: 3660
14 Aug 2014 10:56 PM
So I have a script that adds points to a leaderboard. Stops when touching stops occurring. Simple.

How can I make this ALSO implement a script of
game.Workspace.ENGINE.RG1.Disabled= false

...therefor activating a script. And after touching stops occurring,
game.Workspace.ENGINE.RG1.Disabled= true

local ting = 0

function onTouched(hit)


if ting == 0 then
ting = 1
check = hit.Parent:FindFirstChild("Humanoid")

if check ~= nil then


local user = game.Players:GetPlayerFromCharacter(hit.Parent)
local stats = user:findFirstChild("leaderstats")

if stats ~= nil then
local cash = stats:findFirstChild("Points")
cash.Value = cash.Value + 1
wait(1)
end

end

end

ting = 0
end

end

script.Parent.Touched:connect(onTouched)
Report Abuse
ThatBrickWithGlasses is not online. ThatBrickWithGlasses
Joined: 03 Aug 2011
Total Posts: 3660
14 Aug 2014 10:57 PM
Original script starts at local ting = 0
Report Abuse
Immacularity is not online. Immacularity
Joined: 21 Jun 2014
Total Posts: 419
14 Aug 2014 11:06 PM
OGM FREE MODELS GTFO WE'RE NOT HERE TO FIX THEM
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