local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.KeyDown:connect(function(Key) if(Key:lower() == "m") then script.Parent.Command1:Play()
I am attempting you make this so that in the battlefield you don't have to type certain things, such as you can just hit "m" and your guy will shout "I need ammo over here". Only problem I am having if the script wants me to throw a end in at the bottom of the script, Plus i wonder if it can work with a local script which i have it in now..
Thanks
First of all, great idea. Second, from the code you posted, you are missing ends. You need to put in an end
and end)
respectively.
EDIT: For LocalScripts to work, they must be directly in or a descendant of StarterPack or StarterGui.
Still doesn't work :/