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

Why does this doesn´t work?

Asked by 10 years ago

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

Log in to vote
1
Answered by 10 years ago

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.

0
Thanks :D biocommand 30 — 10y
0
nose problems  infalliblelemon 145 — 10y
0
It's actually now more preferred to put it in "ReplicatedStorage", which is for things like this. Lighting is the old alternative. User#2 0 — 10y
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. infalliblelemon 145 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

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

0
Dammit, that's what I thought. But when I first tried it out it didn't work. Argh. infalliblelemon 145 — 10y

Answer this question