|
| 13 Jul 2016 12:05 PM |
I have 2 guns in my game that damage the NPCs in my game, where the humanoid part is named "Zombie" but when i go to play the game in a server it does no damage. There are a lot of errors in the output that say this "attempt to call global 'onButton1Down' (a nil value)."
Here is the part of the localscript where these errors are at which is the shooter script (the scripts are by manofthelol NOT mine, but i modified them to damage NPCs)
function onEquippedLocal(mouse)
if mouse == nil then print("Mouse not found") return end
mouse.Icon = "http://www.roblox.com/asset/?id=49912389" mouse.Button1Down:connect(function() onButton1Down(mouse) end) <----the error mouse.KeyDown:connect(KeyDownFunctions) while true do wait() end end
Tool.Equipped:connect(onEquippedLocal)
script.Parent.Activated:connect(onActivated) Tool.Equipped:connect(Equip) Tool.Unequipped:connect(Unequip)
|
|
|
| Report Abuse |
|
|
|
| 13 Jul 2016 12:06 PM |
| do you have FilteringEnabled on? |
|
|
| Report Abuse |
|
|
| |
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 13 Jul 2016 12:41 PM |
It means that the function onButton1Down that you call does not exist.
--This is why we don't use free models people! |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2016 01:22 PM |
| I use free models for complicated scripts since I'm making my first game but about the onButton1Down...do I just delete it? Or do i replace it with something else? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 23 Jul 2016 11:42 PM |
| FilteringEnabled prevents localScripts from being seen to the other clients(players), It's a way to prevent exploiting, and if you want to get around that, your solution is to use remote events and remote functions to cross the client - server boundary. If a game with FilteringEnabled on has a store system, it would use remote events/functions. |
|
|
| Report Abuse |
|
|