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

Script Not Responding to Variables? [CLOSED] [closed]

Asked by 8 years ago

I have put a variable in every player that joins a game, called "active". (The player was already declared) My player has a value of 2, but seems to not get the "green laser saw" that he was promised. Even if the value is 1, the player doesn't even get the gun that has to do with that value! I only get a gun with an else statement: (All variables are declared, Script Analysis give me no problems.)

if player.active == 1 then
    gunsfolder.Laser:Clone().Parent = player.Backpack

elseif player.active == 2 then
    gunsfolder["Green Laser Saw"]:Clone().Parent = player.Backpack
else
    gunsfolder.Laser:Clone().Parent = player.Backpack
end

EDIT: I forgot to put "Value" after the variables....

0
Only put closed if it really is closed, don't put closed there if it really isn't. EzraNehemiah_TF2 3552 — 8y

Locked by Redbullusa and EzraNehemiah_TF2

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?