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

Why does this doesn´t work?

I did this StarterGui>ScreenGui>ImageButton>Script here´s the script

script.Parent.MouseButton1Down:connect(function()
game.ServerStorage.LightningWand:Clone().Parent = player.Backpack
end)

What the script is supposed to do is to give the player the Lightning wand that it´s on ServerStorage but it´s not working anybody knows what I did wrong?

2 answers

Don't place it in the ServerStorage. The only place you can put it in is Lighting or ReplicatedStorage. ServerStorage is for server-sided things, like maps and stuff. Instances that the Player doesn't use. Put the tool in Lighting, or ReplicatedStorage, change the script, and it should work.

4 comments

0

Thanks :D

0

nose problems 

0

It's actually now more preferred to put it in "ReplicatedStorage", which is for things like this. Lighting is the old alternative.

0

Yeah, just found that out from YaYaBinks, I thought that when I first read rstorage article, but when I tried it I must have written the script incorrectly.

Lighting is bad. Use ReplicatedStorage, it works both ways. Plus, it's more organized :)

1 comment

0

Dammit, that's what I thought. But when I first tried it out it didn't work. Argh.

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