Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my gun only work in studio???

Asked by
roaf99 0
8 years ago

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!

0
I FOUND ONE THING!!!! IT SAYS "handle is not a valid member of tool" roaf99 0 — 8y
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 drahsid5 250 — 8y

2 answers

Log in to vote
1
Answered by
drahsid5 250 Moderation Voter
8 years ago

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
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" roaf99 0 — 8y
0
Maybe the welds are breaking? drahsid5 250 — 8y
0
WHat do you mean by that? roaf99 0 — 8y
0
They're being removed, or not existing soon enough drahsid5 250 — 8y
View all comments (9 more)
0
Yeah. It still doesnt work after weld. roaf99 0 — 8y
0
How are you welding it? drahsid5 250 — 8y
0
one by script and now with something inside each part. roaf99 0 — 8y
0
Go back to the script thing only, check out my updated scary drahsid5 250 — 8y
0
Answer* drahsid5 250 — 8y
0
what about the localplayer local GUI roaf99 0 — 8y
0
What drahsid5 250 — 8y
0
I have some localplayer.playerGUI roaf99 0 — 8y
0
game.Players[tool.Parent.Name].PlayerGui should work. drahsid5 250 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

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.

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" roaf99 0 — 8y
0
OK I have added welds (NOW IM SURE THEY WORK) and it still says they are invalid roaf99 0 — 8y

Answer this question