Feedback on the first script I wrote?

Hi! This is the first script I wrote. Do you have any suggestions for improving this script?

Pretty good but (looks a lot like my first script) but instead of changing the transparency and cancollide it is more useful to change its parent to serverstorage. It’s only 1 line of code and if you ever want to make a gun the invisible part won’t block the bullets (I know this is pretty advanced but the parent is also just a property)

For the rest it is great for your first script

1 Like

Thanks for your valuable suggestions

Not bad.
For repeated uses of the same part I would make a variable that holds the part.

This means rather than doing game.workspace everytime you can do:

local P = game.workspace.Part

P.Transparency = 1

Its the same sort of thing

1 Like
  1. Fix spacing and indenting (no spaces between lines and no spaces after connect)
  2. Change game.Workspace to workspace (exploiters can change the name of workspace and it’s easier to write. If you do use game.Workspace the W in workspace should be capitalised.)
  3. If you’re trying to create the illusion that the part is gone then just parent to server storage or delete it.
1 Like