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 » Scripters
Home Search
 

Re: HOW DO I MAKE THIS SCRIPT WORK

Previous Thread :: Next Thread 
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 04:41 PM
i want it to delete if a player touches it

deb = false
script.Parent.Touched:connect(function(part)
if game.Players:FindFirstChild(part.Parent.Name) then
if deb == false then
deb = true
local plr = game.ServerStorage.PlayerMoney:FindFirstChild(part.Parent.Name)
script.Parent.BrickColor = BrickColor.new("Bright red")
plr.Value = plr.Value + script.Parent.Parent.Amount.Value
wait(script.Parent.Parent.TimeToWait.Value)
deb = false
script.Parent.BrickColor = BrickColor.new("Bright green")
end
end
end)
function touch()
if game.Players:GetPlayerFromCharacter(hit.Parent)



script.Parent:remove()
end

script.Parent.Touched:connect(touch)
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 04:48 PM
hi
Report Abuse
ForceCyber is not online. ForceCyber
Joined: 06 May 2015
Total Posts: 1086
21 Jul 2017 07:22 PM
Want it to delete when a player touch it?

script.Parent:Destroy()
Report Abuse
MetalPig2002 is not online. MetalPig2002
Joined: 03 Mar 2016
Total Posts: 185
21 Jul 2017 07:23 PM
Yea use script.Parent:Destroy() not script.Parent:remove()


Yours Truly, MetalPig2002
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 07:34 PM
Figured i out on my own hours ago. Nice try laddies.
Report Abuse
ForceCyber is not online. ForceCyber
Joined: 06 May 2015
Total Posts: 1086
21 Jul 2017 07:46 PM
"Nice try", seems like you tried too hard.
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 07:59 PM
Joo make no sense shlawb.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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