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

The shop script's variable is not setting, help needed?

Asked by
iHavoc101 127
5 years ago

Fix this code pls

01print("Shop Script Loaded")
02 
03local Saber = ["Kylo Ren's Crossguard Lightsaber"]
04Door = script.Parent
05local debounce = false
06 
07function getPlayer(humanoid)
08local players = game.Players:children()
09for i = 1, #players do
10if players[i].Character.Humanoid == humanoid then return players[i] end
11end
12return nil
13end
14function onTouched(hit)
15if debounce == false then
View all 38 lines...
0
for the love of god please format your coding mightydifferent 85 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

try setting this:

1game.Lighting.Saber:clone().Parent = player.Backpack

to this:

1game.Lighting[Saber]:clone().Parent = player.Backpack
Ad

Answer this question