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: Help on a script

Previous Thread :: Next Thread 
HILLBILLYY is not online. HILLBILLYY
Joined: 08 May 2010
Total Posts: 764
23 May 2012 04:18 PM
wait(1)

x = game.Workspace.KillDoor

while true do

if x.Value < 1 then
game.Workspace.GroupDoor.Parent = game.Lighting
wait(10)
game.Lighting.GroupDoor.Parent = game.Workspace
end
end


Need help fixing this door script were if its value hits 0 then it moves the groupDoor for raiders to get into from.

Also a tool that can remove value of an object anyone know how to help?
Report Abuse
damanofrunescape is not online. damanofrunescape
Joined: 29 Jul 2008
Total Posts: 7338
23 May 2012 04:26 PM
local val = workspace.KillDoor --Is this a number value? Lol
local originalVal = val.Value
local door = workspace.GroupDoor

val.Value.Changed:connect(function() --If the value changes...
if val.Value <= 0 then --If the value is less than 1...
local cf = door.CFrame --Store it's position and angle for later
door.CFrame = CFrame.new(10000,10000,10000) --Could just make it transparent and CanCollide false.
wait(10) --Waits 10 seconds
door.CFrame = cf --Resets its position and angle
val.Value = originalVal --Resets the value back to normal
end
end)


--Not sure what you mean by the tool. Remove the value or set its value to 0?
Report Abuse
HILLBILLYY is not online. HILLBILLYY
Joined: 08 May 2010
Total Posts: 764
23 May 2012 04:29 PM
Like a sword but that affects the killdoor thingy
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