I have this gun script and when I test it, only PC players can reload. I tried ContextActionService with no luck, and I tried a mobile-only GUI, which also had no luck.

This is the reloading part:

function onKeyDown(key,mouse)
	key=key:lower()
	if key=="r" or script.Parent.Name == "Assault Rifle [0]" and not reloading then
		reload(mouse)
	end
end

reloading is a variable.

The whole script is here.

https://pastebin.com/LK6Crvih

3 comments

0

This was deleted because I deleted it :/

0

The only way to do this is through ContextActionService, I recommend you look at the API reference and or watch some tutorials on youtube to try and find out why it wasn't working.

0

keydown is deprecated