nasirs001
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 395 |
|
|
| 13 Mar 2014 04:17 PM |
| ok so as roblox has made regular scripts in hopperbins unable to work will my regular scripts work in localscripts if I just copy and past the code? |
|
|
| Report Abuse |
|
|
| 13 Mar 2014 04:26 PM |
Almost surely.
The only feature which local scripts do not retain is the ability to replicate some instances (messages, hints, sounds), but for the most part this is desired anyway. |
|
|
| Report Abuse |
|
nasirs001
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 395 |
|
|
| 13 Mar 2014 04:39 PM |
well I must be doing something wrong beause this script refuses to work it gets as far as changing the mouse but stops there
--clockwork
local bin = Game.Players.LocalPlayer.Backpack:FindFirstChild("Earth Barrier") local Player = Game.Players.LocalPlayer local mouse = Player:GetMouse() local c = Player.Character
enabled = true
function onButton1Down(mouse) if not enabled then return end local player = game.Players.LocalPlayer enabled = false game:GetService("Chat"):Chat(c.Head, "Earth Barrier!!!")
Seal = Instance.new("Model", c) Game:GetService("Debris"):AddItem(Seal, 20) Sideb = Instance.new("Part", Seal) Sideb.BrickColor = BrickColor.new("CGA brown") Sideb.Position = mouse.Hit.p + Vector3.new(-0.1, 5.7, 4.8) Sideb.Anchored = true Sideb.Name = ("Part2") Sideb.FormFactor = ("Custom") Sideb.Size = Vector3.new(9.8, 10, 0.2) function Damage(hit) human = hit.Parent:FindFirstChild("Humanoid") -- returns "Humanoid" if exists, else returns nil if human ~= nil then local player = game.Players.LocalPlayer if player == true then return end print("trigger") -- if the toucher is human, then player.Character.Torso.Anchored = true wait(5) player.Character.Torso.Anchored = false -- damage the human end end Sideb.Touched:connect(Damage)
Sided = Instance.new("Part", Seal) Sided.Anchored = true Sided.Name = ("Part4") Sided.BrickColor = BrickColor.new("CGA brown") Sided.FormFactor = ("Custom") Sided.Size = Vector3.new(9.8, 10, 0.1) Sided.Position = mouse.Hit.p + Vector3.new(0.1, 5.7, -4.9) function Damage(hit) human = hit.Parent:FindFirstChild("Humanoid") -- returns "Humanoid" if exists, else returns nil if human ~= nil then local player = game.Players.LocalPlayer if player == true then return end print("trigger") -- if the toucher is human, then player.Character.Torso.Anchored = true wait(5) player.Character.Torso.Anchored = false -- damage the human end end Sided.Touched:connect(Damage)
Sidea = Instance.new("Part", Seal) Sidea.Anchored = true Sidea.Name = ("Part1") Sidea.BrickColor = BrickColor.new("CGA brown") Sidea.Rotation = Vector3.new(0, 90, 0) Sidea.FormFactor = ("Custom") Sidea.Size = Vector3.new(9.8, 10, 0.2) Sidea.Position = mouse.Hit.p + Vector3.new(4.9, 5.7, 0.1) function Damage(hit) human = hit.Parent:FindFirstChild("Humanoid") -- returns "Humanoid" if exists, else returns nil if human ~= nil then local player = game.Players.LocalPlayer if player == true then return end print("trigger") -- if the toucher is human, then player.Character.Torso.Anchored = true wait(5) player.Character.Torso.Anchored = false -- damage the human end end Sidea.Touched:connect(Damage)
Sidee = Instance.new("Part", Seal) Sidee.Anchored = true Sidee.BrickColor = BrickColor.new("CGA brown") Sidee.Name = ("Part5") Sidee.FormFactor = ("Custom") Sidee.Size = Vector3.new(10, 0.2, 10) Sidee.Position = mouse.Hit.p + Vector3.new(0, 10.7, 0) function Damage(hit) human = hit.Parent:FindFirstChild("Humanoid") -- returns "Humanoid" if exists, else returns nil if human ~= nil then local player = game.Players.LocalPlayer if player == true then return end print("trigger") -- if the toucher is human, then player.Character.Torso.Anchored = true wait(5) player.Character.Torso.Anchored = false -- damage the human end end Sidee.Touched:connect(Damage)
Sidec = Instance.new("Part", Seal) Sidec.Anchored = true Sidec.Name = ("Part3") Sidec.BrickColor = BrickColor.new("CGA brown") Sidec.Rotation = Vector3.new(0, 90, 0) Sidec.FormFactor = ("Custom") Sidec.Size = Vector3.new(9.8, 10, 0.2) Sidec.Position = mouse.Hit.p + Vector3.new(-4.9, 5.7, -0.2) function Damage(hit) human = hit.Parent:FindFirstChild("Humanoid") -- returns "Humanoid" if exists, else returns nil if human ~= nil then local player = game.Players.LocalPlayer if player == true then return end print("trigger") -- if the toucher is human, then player.Character.Torso.Anchored = true wait(5) player.Character.Torso.Anchored = false -- damage the human end end Sidec.Touched:connect(Damage)
wait(1) enabled = true end
function onSelected(mouse) print("select") mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end
bin.Selected:connect(onSelected)
|
|
|
| Report Abuse |
|