|
| 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 |
|
|
|
| 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 |
|
|
|
| 23 May 2012 04:29 PM |
| Like a sword but that affects the killdoor thingy |
|
|
| Report Abuse |
|
|