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 is wrong with this script?

Previous Thread :: Next Thread 
crazykidz10 is not online. crazykidz10
Joined: 15 Oct 2010
Total Posts: 456
11 Jun 2014 05:39 AM
P = game.Players.crazykidz10

function onChatted(msg, recipient, speaker)
if msg == "Superjump" then
local b = Instance.new("BodyForce")
b.force = Vector3.new(0,2000,0)
b.Parent = game.Workspace.amaz.Torso

elseif msg == "Reset" then
game.Workspace.amaz.Humanoid.Health= 0

elseif msg == "God" then
local f = Instance.new("ForceField")
f.Parent = workspace.amaz
game.Workspace.amaz.Torso.Reflectance = 1
game.Workspace.amaz.Head.Reflectance = 1
game.Workspace.amaz:FindFirstChild("Left Leg").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Right Leg").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Right Arm").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Left Arm").Reflectance = 1
game.Workspace.amaz.Humanoid.MaxHealth= 0

end
end


P.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, speaker) end)
Report Abuse
crazykidz10 is not online. crazykidz10
Joined: 15 Oct 2010
Total Posts: 456
11 Jun 2014 05:40 AM
b1
Report Abuse
crazykidz10 is not online. crazykidz10
Joined: 15 Oct 2010
Total Posts: 456
11 Jun 2014 05:41 AM
b2
Report Abuse
Ceoh is not online. Ceoh
Joined: 17 Nov 2013
Total Posts: 152
11 Jun 2014 05:42 AM
Is there any error in the output?
Report Abuse
crazykidz10 is not online. crazykidz10
Joined: 15 Oct 2010
Total Posts: 456
11 Jun 2014 05:43 AM
Well, this script is old.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
11 Jun 2014 05:51 AM
P.Chatted:connect(onChatted)
Report Abuse
crazykidz10 is not online. crazykidz10
Joined: 15 Oct 2010
Total Posts: 456
11 Jun 2014 05:52 AM
This?
P = game.Players.crazykidz10

function onChatted(msg, recipient, speaker)
if msg == "Superjump" then
local b = Instance.new("BodyForce")
b.force = Vector3.new(0,2000,0)
b.Parent = game.Workspace.amaz.Torso

elseif msg == "Reset" then
game.Workspace.amaz.Humanoid.Health= 0

elseif msg == "God" then
local f = Instance.new("ForceField")
f.Parent = workspace.amaz
game.Workspace.amaz.Torso.Reflectance = 1
game.Workspace.amaz.Head.Reflectance = 1
game.Workspace.amaz:FindFirstChild("Left Leg").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Right Leg").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Right Arm").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Left Arm").Reflectance = 1
game.Workspace.amaz.Humanoid.MaxHealth= 0

end
end


P.Chatted:connect(onChatted)
(msg, recipient, speaker) end)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
11 Jun 2014 06:04 AM
No, remove that last line.
Report Abuse
crazykidz10 is not online. crazykidz10
Joined: 15 Oct 2010
Total Posts: 456
11 Jun 2014 06:21 AM
P = game.Players.crazykidz10

function onChatted(msg, recipient, speaker)
if msg == "Superjump" then
local b = Instance.new("BodyForce")
b.force = Vector3.new(0,2000,0)
b.Parent = game.Workspace.amaz.Torso

elseif msg == "Reset" then
game.Workspace.amaz.Humanoid.Health= 0

elseif msg == "God" then
local f = Instance.new("ForceField")
f.Parent = workspace.amaz
game.Workspace.amaz.Torso.Reflectance = 1
game.Workspace.amaz.Head.Reflectance = 1
game.Workspace.amaz:FindFirstChild("Left Leg").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Right Leg").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Right Arm").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Left Arm").Reflectance = 1
game.Workspace.amaz.Humanoid.MaxHealth= 0

end
end


P.Chatted:connect(onChatted)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
11 Jun 2014 06:32 AM
Exactly.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
11 Jun 2014 06:35 AM
Lemme improve it slightly...




Admins = {"crazykidz10", "warspyking"}

game.Players.PlayerAdded:connect(function(P)
for _,v in ipairs(Admins) do
if P.Name:lower() == v:lower() then
P.Chatted:connect(function(msg, recipient, speaker)
if msg == "Superjump" then
local b = Instance.new("BodyForce")
b.force = Vector3.new(0,2000,0)
b.Parent = game.Workspace.amaz.Torso

elseif msg == "Reset" then
game.Workspace.amaz.Humanoid.Health= 0

elseif msg == "God" then
local f = Instance.new("ForceField")
f.Parent = workspace.amaz
game.Workspace.amaz.Torso.Reflectance = 1
game.Workspace.amaz.Head.Reflectance = 1
game.Workspace.amaz:FindFirstChild("Left Leg").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Right Leg").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Right Arm").Reflectance = 1
game.Workspace.amaz:FindFirstChild("Left Arm").Reflectance = 1
game.Workspace.amaz.Humanoid.MaxHealth= 0

end
end)
end
end
end)
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