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: What's wrong with this script?

Previous Thread :: Next Thread 
FriendlyScripter is not online. FriendlyScripter
Joined: 19 Feb 2012
Total Posts: 222
06 Dec 2012 08:27 PM
Note: everything worked fine until I added the "me" variable (watever u call it)

me = "FriendlyScripter"

hop = Instance.new("HopperBin",game.Players.me.Backpack)
hop.Selected:connect(function(mouse)
hop.Parent = nil
mouse.KeyDown:connect(function(key)
if key == "r" then
a = Instance.new("Message",game.Workspace)
a.Text = "Hello.. testing"
wait(2)
a:Destroy()
elseif key == "q" then
m = Instance.new("Message",game.Workspace)
m.Text = "testing this too"
wait(2)
m:Destroy()
elseif key == "b" then
local part = Instance.new("Part",game.Workspace)
part.CFrame = CFrame.new(game.Workspace.me.Head.CFrame.p)
part.Anchored = false
part.FormFactor = "Custom"
part.Size = Vector3.new(0.3,0.3,0.3)
part.Name = "part808"
part.BrickColor = BrickColor.new("Bright red")
wait(1)
part:Destroy()
elseif key == "c" then
for i,v in pairs(game.Players:GetChildren()) do
a = Instance.new("Message",game.Workspace)
a.Text = v.Character.Name .. " age " .. v.AccountAge
wait(2)
a:Destroy()
end
end
end)
end)
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
06 Dec 2012 08:28 PM
me = "FriendlyScripter"

hop = Instance.new("HopperBin",game.Players[me]Backpack)
hop.Selected:connect(function(mouse)
hop.Parent = nil
mouse.KeyDown:connect(function(key)
if key == "r" then
a = Instance.new("Message",game.Workspace)
a.Text = "Hello.. testing"
wait(2)
a:Destroy()
elseif key == "q" then
m = Instance.new("Message",game.Workspace)
m.Text = "testing this too"
wait(2)
m:Destroy()
elseif key == "b" then
local part = Instance.new("Part",game.Workspace)
part.CFrame = CFrame.new(game.Workspace.me.Head.CFrame.p)
part.Anchored = false
part.FormFactor = "Custom"
part.Size = Vector3.new(0.3,0.3,0.3)
part.Name = "part808"
part.BrickColor = BrickColor.new("Bright red")
wait(1)
part:Destroy()
elseif key == "c" then
for i,v in pairs(game.Players:GetChildren()) do
a = Instance.new("Message",game.Workspace)
a.Text = v.Character.Name .. " age " .. v.AccountAge
wait(2)
a:Destroy()
end
end
end)
end)
Report Abuse
FriendlyScripter is not online. FriendlyScripter
Joined: 19 Feb 2012
Total Posts: 222
06 Dec 2012 08:31 PM
Still didn't work. But this time it said a diff error.
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
07 Dec 2012 06:37 AM
me = "FriendlyScripter"

hop = Instance.new("HopperBin",game.Players[me].Backpack)
hop.Selected:connect(function(mouse)
hop.Parent = nil
mouse.KeyDown:connect(function(key)
if key == "r" then
a = Instance.new("Message",game.Workspace)
a.Text = "Hello.. testing"
wait(2)
a:Destroy()
elseif key == "q" then
m = Instance.new("Message",game.Workspace)
m.Text = "testing this too"
wait(2)
m:Destroy()
elseif key == "b" then
local part = Instance.new("Part",game.Workspace)
part.CFrame = CFrame.new(game.Workspace[me].Head.Position)
part.Anchored = false
part.FormFactor = "Custom"
part.Size = Vector3.new(0.3,0.3,0.3)
part.Name = "part808"
part.BrickColor = BrickColor.new("Bright red")
wait(1)
part:Destroy()
elseif key == "c" then
for i,v in pairs(game.Players:GetChildren()) do
a = Instance.new("Message",game.Workspace)
a.Text = v.Character.Name .. " age " .. v.AccountAge
wait(2)
a:Destroy()
end
end
end)
end)



Here it is fixed. no thx needed :)

~sycips~
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