ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 02 Dec 2013 05:19 PM |
| I am developing a HopperBin. It has a few key commands and chat commands. When I use the 'Reset' chat command it breaks the tool when I respawn. But not with the key command it has the same code. Any idea on what might be the problem? |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
| |
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 02 Dec 2013 05:25 PM |
| New news. It breaks every time I die... |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 02 Dec 2013 05:27 PM |
| SCRIPTING Helpers is especially usefull when they get the script. I have no clue. |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 02 Dec 2013 05:29 PM |
Sorry.
plr=game.Players.LocalPlayer mouse=plr:GetMouse() char=plr.Character
script.Parent.Selected:connect(function() on=true end)
mouse.KeyDown:connect(function(key) -- This is the start of the Key functions. if on==true then if key=="z" then -- Run script.Running.Value=true char.Humanoid.WalkSpeed=50 if script.Hidden.Value==true then script.Hidden.Value=false for i,v in pairs(char:GetChildren()) do if v:IsA("Part") then v.Transparency=0 elseif v:IsA("Hat") then v.Handle.Transparency=0 end end end end
if key=="x" then -- Walk char.Humanoid.WalkSpeed=16 script.Running.Value=false end
if key=="r" then -- Reset char.Humanoid.Health=0 end
if key=="c" then -- Hidden if script.Running.Value==true then char.Humanoid.WalkSpeed=16 script.Running.Value=false end script.Hidden.Value=true for i,v in pairs(char:GetChildren()) do if v:IsA("Part") then v.Transparency=.9 elseif v:IsA("Hat") then v.Handle.Transparency=.9 end end end
end end) -- This is the end of the Key functions.
mouse.Button1Down:connect(function() -- Teleport (Click) mH=mouse.Hit tor=char:findFirstChild("Torso") if tor then tor.CFrame=CFrame.new(mH.p)+Vector3.new(0, 4, 0) end end)
plr.Chatted:connect(function(chat) -- Start of Chat commands if on==true then if chat=="Run" then -- Run script.Running.Value=true char.Humanoid.WalkSpeed=50 if script.Hidden.Value==true then script.Hidden.Value=false for i,v in pairs(char:GetChildren()) do if v:IsA("Part") then v.Transparency=0 elseif v:IsA("Hat") then v.Handle.Transparency=0 end end end end
if chat=="Walk" then --Walk char.Humanoid.WalkSpeed=16 script.Running.Value=false end
if chat=="Reset" then char.Humanoid.Health=0 -- Reset end
if chat=="Hide" then if script.Running.Value==true then char.Humanoid.WalkSpeed=16 script.Running.Value=false end script.Hidden.Value=true for i,v in pairs(char:GetChildren()) do if v:IsA("Part") then v.Transparency=.9 elseif v:IsA("Hat") then v.Handle.Transparency=.9 end end end
end end)
script.Parent.Deselected:connect(function() on=false end)
|
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 02 Dec 2013 05:30 PM |
Here is a model of the tool: http://www.roblox.com/Tool-item?id=137262917 |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
| |
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
| |
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 02 Dec 2013 06:54 PM |
| Chat == ? I dont think you can do this. |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
| |
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 03 Dec 2013 04:24 PM |
| Help, please. I can't find the problem. X_X |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
| |
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
| |
|
|
| 03 Dec 2013 08:05 PM |
Needs to be a LocalScript.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 03 Dec 2013 08:06 PM |
| Oh. My. God. Thanks. Excuse my language if you are a religious man, but, I'M A FUGIN IDIOT. |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
| |
|
|
| 03 Dec 2013 08:16 PM |
Worked for me. Did you forget to put the bool values into the LocalScript?
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 03 Dec 2013 08:18 PM |
| I don't think I forgot... Lemme test it again. |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 03 Dec 2013 08:24 PM |
| It works fine in test mode. But not in a server.... |
|
|
| Report Abuse |
|
|