First of all, let me fix this script. I noticed you made a few errors.
1 | <pre class = "brush: lua" ></pre> |
3 | TextButton = Frame.TextButton |
4 | local Ak 47 = game:GetService( "StorageService" ).Ak 47 |
6 | Ak 47. Parent = game.StarterPack |
8 | TextButton.MouseButton 1 Click:Connect(HasClicked) |
9 | <pre class = "brush: lua" ></pre> |
Ah! Much better.
Problems
1) On line 6, you did "StartPack" not "Starterpack" I don't think there's such thing as "StartPack".
2) On line 8, don't use :connect(). It's deprecated and it doesn't work anymore; Try using :Connect().
3) On line 8, you made another function by making the function(HasClicked)
, furthermore you need to do the following:
1 | TextButton.MouseButton 1 Click:Connect(HasClicked) |
The reason why there is no end)
is because it's connecting to a function you made, not creating another in the same line of code.
4) Lastly, on line 13 of your code, it is print()
not Print()
.
If I helped, let me know down on the comments. If you don't understand something, just ask me.