sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 11 Aug 2011 10:10 AM |
@huner: Roblox Studio plz, try again
@avent: I don't like how that's being cloned exactly. Try this.
model = script.Parent.Parent.Parent.Remover upgradeStuff = model:clone() model:remove() local ting = 0
function onClicked() if ting == 0 then ting = 1 upgradeStuff:clone().Parent = script.Parent.Parent.Parent wait(2) script.Parent.Parent.Parent.Remover:remove() script.Parent.Parent.Name = "Reloading Unjammer" wait(120) script.Parent.Parent.Name = "Unjam Conveyor Belts" ting = 0 end end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
@Starry:
it's full of slashes |
|
|
| Report Abuse |
|
|
Starryguy
|
  |
| Joined: 07 Dec 2009 |
| Total Posts: 95 |
|
|
| 11 Aug 2011 10:12 AM |
THE /'S ARE SUPPOST TO BE -- The real script: (Without the notes) door=script.Parent.Parent.door game.Workspace.Part.Touched:connect(function(hit) if hit.Parent.Humanoid~= nil then door.CanCollide=false door.BodyPosition.position=door.PosOpen.Value wait(2) door.CanCollide=true for i=1, 18 do door.BodyPosition.position=door.PosOpen.Value wait(1) end door.CanCollide=false door.BodyPosition.position=door.PosClosed.Value wait(2) door.CanCollide=true end end)
|
|
|
| Report Abuse |
|
|
aventuras
|
  |
| Joined: 28 Dec 2007 |
| Total Posts: 77 |
|
| |
|
|
| 11 Aug 2011 10:13 AM |
Nao tell me if my DP leaderboard which I have spent time on creating is good,
game.Players.PlayerAdded:connect(function(Player) local Leaderstats = Instance.new("IntValue") Leaderstats.Name = "leaderstats" Leaderstats.Parent = Player
local Points = Instance.new("IntValue", Player) Points.Name = "TestPoints" Points.Value = 0
local Fuel = Instance.new("IntValue", Player) Fuel.Name = "Fuel" Fuel.Value = 0
local Cash = Instance.new("IntValue", Leaderstats) Cash.Name = "Cash" Cahs.Value = 0
local Level = Instance.new("IntValue", Leaderstats) Level.Name = "Level" Level.Value = 1
newPlayer:WaitForDataReady() loadScore(Player, Cash) loadScore(Player, Level) loadNumber(Player, Fuel)
local OneHundred = 100 local RealPoints = 0 local OldPoints = Player.TestPoints.Value Player.TestPoints.Changed:connect(function(Val) RealPoints = RealPoints + (Val - OldPoints) OldPoints = Val if RealPoints >= 100 then RealPoints = RealPoints - 100 Level.Value = Level.Value + 1 end
game.Players.PlayerRemoving:connect(function(OldPlayer) local stats = OldPlayer:FindFirstChild("leaderstats") if (stats ~= nil) then local cash = stats:FindFirstChild("Cash") if (cash ~= nil then) saveScore(OldPlayer, cash) local level = stats:FindFirstChild("Level") if (Level ~= nil then) saveScore(OldPlayer, level) local fuel = OldPlayer:FindFirstChild("Fuel") if (fuel ~= nil then) SaveNumber(OldPlayer, fuel) end end end end end)
end) end) |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 11 Aug 2011 10:13 AM |
AHHAHAHAH latepost
I don't see why that wouldn't work, Starry. Test it by pressing the little green play button aswell as solo. |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 11 Aug 2011 10:15 AM |
@MARIO:
i thought that when the player leaves, all of its children are lost |
|
|
| Report Abuse |
|
|
Starryguy
|
  |
| Joined: 07 Dec 2009 |
| Total Posts: 95 |
|
|
| 11 Aug 2011 10:16 AM |
I tested: Play Solo Real Server play Run Script (Green play button) Body Position has these values by the way: D: 1250 P: 10000 maxForceL 10000, 1.#INFe+000, 10000 |
|
|
| Report Abuse |
|
|
| |
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 11 Aug 2011 10:20 AM |
@Starry: Fill it full of prints and see if it prints them all
@MARIO: huh. didn't know that. Okay, it looks like it probably could possibly might work. |
|
|
| Report Abuse |
|
|
Starryguy
|
  |
| Joined: 07 Dec 2009 |
| Total Posts: 95 |
|
|
| 11 Aug 2011 10:23 AM |
Thu Aug 11 16:21:36 2011 - Humanoid is not a valid member of Model Thu Aug 11 16:21:36 2011 - Script "Workspace.Model.Part.Script", Line 3 Thu Aug 11 16:21:36 2011 - stack end Thu Aug 11 16:21:36 2011 - Disconnected event because of exception Thu Aug 11 16:21:36 2011 - Humanoid is not a valid member of Model Thu Aug 11 16:21:36 2011 - Script "Workspace.Model.Part.Script", Line 3 Thu Aug 11 16:21:36 2011 - stack end Thu Aug 11 16:21:36 2011 - Disconnected event because of exception |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 11 Aug 2011 10:25 AM |
| What happened to the :findFirstChild() around the Humanoid? |
|
|
| Report Abuse |
|
|
Starryguy
|
  |
| Joined: 07 Dec 2009 |
| Total Posts: 95 |
|
|
| 11 Aug 2011 10:30 AM |
| Might have not saved. Changed it and now it still does not work but no more errors. |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
| |
|
Starryguy
|
  |
| Joined: 07 Dec 2009 |
| Total Posts: 95 |
|
|
| 11 Aug 2011 10:37 AM |
Moved script into door. door=script.Parent script.Parent.Parent.Part1.Touched:connect(onhit) script.Parent.Parent.Part2.Touched:connect(onhit) function onhit(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then print("Thing is humanoid") door.CanCollide=false print("CanCollide is FALSE") door.BodyPosition.position=door.PosOpen.Value print("Move") wait(2) door.CanCollide=true print("Moved") for i=1, 18 do door.BodyPosition.position=door.PosOpen.Value print("Loop") wait(1) end door.CanCollide=false door.BodyPosition.position=door.PosClosed.Value print("Closing") wait(2) door.CanCollide=true print("Closed") end |
|
|
| Report Abuse |
|
|
Starryguy
|
  |
| Joined: 07 Dec 2009 |
| Total Posts: 95 |
|
| |
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 11 Aug 2011 02:47 PM |
| ... well? How far did it print? |
|
|
| Report Abuse |
|
|
Starryguy
|
  |
| Joined: 07 Dec 2009 |
| Total Posts: 95 |
|
| |
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 11 Aug 2011 04:07 PM |
Huh. I didn't expect that.
Ohwells. Anymoarquestions? |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
| |
|
|
| 12 Aug 2011 07:39 AM |
| make me plane dat fly pls pls pls pls pls |
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 12 Aug 2011 07:53 AM |
@DARKSTER:
bin=script.Parent plane=nil hold=false local debounce = false local planedebounce = false local stuntdebounce = false local controlling = false
function fire(pln,spn) local missile = bin.Rocket:clone() missile.CFrame = spn.CFrame * CFrame.new(0, 0, -35)
missile.RocketScript.Disabled = false missile.Parent = game.Workspace
local creator_tag = Instance.new("ObjectValue") creator_tag.Value = game.Players.LocalPlayer creator_tag.Name = "creator" creator_tag.Parent = missile
missile.Owner.Value = pln end
function computeDirection(vec) local lenSquared = vec.magnitude * vec.magnitude local invSqrt = 1 / math.sqrt(lenSquared) return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt) end
function move(target, engine) local origincframe = engine:findFirstChild("BodyGyro").cframe local dir = (target - engine.Position).unit local spawnPos = engine.Position
local pos = spawnPos + (dir * 1)
engine:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000, 9000, 9000) engine:findFirstChild("BodyGyro").cframe = CFrame.new(pos, pos + dir) wait(0.1) engine:findFirstChild("BodyGyro").maxTorque = Vector3.new(0, 0, 0) engine:findFirstChild("BodyGyro").cframe = origincframe end
function findPlane(player) local list = player.Character:GetChildren() for x = 1, #list do if (list[x].Name == "Plane") then local weld = list[x]:FindFirstChild("Parts"):FindFirstChild("Seat"):FindFirstChild("SeatWeld") if (weld ~= nil) and (weld.Part1 == player.Character:FindFirstChild("Torso")) then return list[x] end end end return nil end
function onButton1Down(mouse) local vehicle = findPlane(script.Parent.Parent.Parent) if vehicle ~= nil and debounce == false and planedebounce == false then debounce = true
controlling = true
while true do wait() local engine = vehicle.Parts.Engine local position = mouse.Hit local target = position.p if engine:findFirstChild("FlyScript") ~= nil then move(target, engine) end if planedebounce == true or controlling == false then break end end wait(.1) debounce = false end end
function onButton1Up(mouse) controlling = false end
function onSelected(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) mouse.Button1Up:connect(function() onButton1Up(mouse) end) mouse.KeyDown:connect(onKeyDown) end
function onKeyDown(key) if (key~=nil) then key = key:lower() local vehicle = findPlane(script.Parent.Parent.Parent) if (vehicle==nil) then return end plane = vehicle.Parts local engine = vehicle.Parts.Engine if (key=="f") and (bin.Reload.Value == 0) then fire(vehicle,plane.Gun1) fire(vehicle,plane.Gun2) bin.Reload.Value = 1 wait(1) bin.Reload.Value = 0 end if (key=="x") and planedebounce == false then local power = plane.Engine:findFirstChild("FlyScript") if (power ~= nil) then power:remove() end end if (key=="y") then local power = plane.Engine:findFirstChild("FlyScript") if (power ~= nil) then return end local fly = script.FlyScript:clone() fly.Disabled = false fly.Parent = plane.Engine end if (key=="k") and planedebounce == false then wait() engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y -0.7, 0) wait() engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y -0.7, 0) wait() engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y -0.7, 0) wait() engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y -0.7, 0) end if (key=="h") and planedebounce == false then wait() engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y +0.7, 0) wait() engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y +0.7, 0) wait() engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y +0.7, 0) wait() engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y +0.7, 0) return end if (key=="j") and planedebounce == false then local body = plane.Engine.BodyGyro body.maxTorque = Vector3.new(9000, 9000, 9000)
local position = engine.CFrame * Vector3.new(0, 0.5, -4) local dir = position - engine.Position
dir = computeDirection(dir)
local spawnPos = engine.Position
local pos = spawnPos + (dir * 8)
body.cframe = CFrame.new(pos, pos + dir) wait(.2) body.maxTorque = Vector3.new(0, 0, 0) end if (key=="l") and planedebounce == false then local body = plane.Engine.BodyGyro body.maxTorque = Vector3.new(9000, 0, 0) local frame = plane:FindFirstChild("OriginCFrame") if frame ~= nil then body.cframe = frame.Value end wait(0.1) body.maxTorque = Vector3.new(0, 0, 0) end if (key=="u") and planedebounce == false then local body = plane.Engine.BodyGyro body.maxTorque = Vector3.new(9000, 9000, 9000)
local position = engine.CFrame * Vector3.new(0, -0.5, -4) local dir = position - engine.Position
dir = computeDirection(dir)
local spawnPos = engine.Position
local pos = spawnPos + (dir * 8)
body.cframe = CFrame.new(pos, pos + dir) wait(.2) body.maxTorque = Vector3.new(0, 0, 0) end if (key=="g") and planedebounce == false and stuntdebounce == false then planedebounce = true stuntdebounce = true plane.Parent.Stunt.Value = 1 local body = plane.Engine.BodyGyro body.maxTorque = Vector3.new(9000, 9000, 9000)
local currentframe = plane.Engine.CFrame
for i = 1,6 do body.cframe = plane.Engine.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, 30) wait(.2) end
body.cframe = currentframe wait(.6)
body.maxTorque = Vector3.new(0, 0, 0) planedebounce = false plane.Parent.Stunt.Value = 0 wait(3) stuntdebounce = false end if (key=="t") and planedebounce == false and stuntdebounce == false then planedebounce = true stuntdebounce = true plane.Parent.Stunt.Value = 1 local body = plane.Engine.BodyGyro body.maxTorque = Vector3.new(9000, 9000, 9000)
local currentframe = plane.Engine.CFrame local valy = 30 local valz = 30
for i = 1,8 do body.cframe = currentframe * CFrame.fromEulerAnglesXYZ(0, valy, valz) valy = valy +50 valz = valz +100 wait(.1) end
body.cframe = currentframe * CFrame.fromEulerAnglesXYZ(0, 600, 0)
wait(.5)
body.maxTorque = Vector3.new(0, 0, 0) planedebounce = false plane.Parent.Stunt.Value = 0 wait(4) stuntdebounce = false end end end
bin.Selected:connect(onSelected) |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Aug 2011 08:03 AM |
Ehhh...seriously you gave yourself the pain to script this? O_O I know how to script dude,just wanted to put a troll face to make you know that I'm kidding(BUT I HAZ NO TROLL FAIC BUTTN ON MAH KEYBORD D:) However,don't think your work is totally useless,it has inspired and I'll get it into my plane script,I'm trying to make a realstic jet,I mean aerodynamics and stuff. It fails right now XD.
|
|
|
| Report Abuse |
|
|
sdfgw
|
  |
 |
| Joined: 08 Jan 2009 |
| Total Posts: 41681 |
|
|
| 12 Aug 2011 08:04 AM |
@sum: NOPE
@DARK: I found this in free models without looking at it, good luck
srsly I don't make scripts for others any more |
|
|
| Report Abuse |
|
|
| |
|