Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does my gun only work in studio???

nothing here seems to work, Studio says there are no errors, and it works fine there but not ingame! Here is the script ITS SUPPOSED TO CREATE AND FIRE THE BULLETS/MAKE THE GUN WORK IN GENERAL!! https://docs.google.com/document/d/1LVWhDSxOM0sI2awWUUVmWWDi1X3sPSkNhgjzfJYMJnU/edit?usp=sharing This is the script! You can comment on it (highlight and control click) Sadly i couldnt fit it here...

COMMENT ON THE DOCUMENT!

2 comments

0

I FOUND ONE THING!!!! IT SAYS "handle is not a valid member of tool"

0

You're question doesn't explain your problem, you should use modules to define the settings of your weapon, it's not recromended that younuse ROBLOX tools to create such weapons

2 answers

If it's telling you that "Handle" is not a valid , make sure that the tool has a brick named "Handle", make sure the handle is unanchored and make sure that bricks attached to the handle are welded. If The problem persists, use tool:WaitForChild("Handle") at the beginning of the script.

-- Oh! Okay, so below you said you changed it to a normal script, inside of that changle all of the parts that look like:

game.Players.LocalPlayer.Character

to

tool.Parent

13 comments

0

Hmmm Weird. I have welded them and added that script, still works in studio, but not at all in game. Same error message about the "handle not being a part of tool"

0

Maybe the welds are breaking?

0

WHat do you mean by that?

0

They're being removed, or not existing soon enough

0

Yeah. It still doesnt work after weld.

0

How are you welding it?

0

one by script and now with something inside each part.

0

Go back to the script thing only, check out my updated scary

0

Answer*

0

what about the localplayer local GUI

0

What

0

I have some localplayer.playerGUI

0

game.Players[tool.Parent.Name].PlayerGui should work.

Like the above answer says, make sure Handle is named "Handle". Also, Studio doesn't care if you're using a LocalScript or a ServerScript(A regular script.) for anything. Without details, I can't really help you with much, only that you should make sure Handle is spelt correctly and that you're using a script.

**Remember: LocalScripts run on the client (The player's computer, phone, or tablet. Or otherwise the ROBLOX Client I believe.), while ServerScripts run on the game.

2 comments

0

OK i changed it too a normal script. now a bunch of errors are showing. There is no "handle is not a member of tool" but it keeps freaking out about "localplayer" and "HTTP 404 doesn't exist"

0

OK I have added welds (NOW IM SURE THEY WORK) and it still says they are invalid

This discussion is preserved as it was. New answers, comments, and votes are closed.