I want to make a script where if the value is a certain number the game print something but it dosen't. To fix the problem I used elseif but it still didn't work. how do I make it work?
local player = script.Parent.Parent.Parent
local char = player.Name
script.Parent.Activated:Connect(function()
if script.Parent.Value.Value == 1 then
print("k")
if script.Parent.Value.Value == 2 then
print("1")
if script.Parent.Value.Value == 3 then
print("s")
end
end
end
end)
how do I make it work for every number unless it isn't in the script? Thank you if you answer.

4 comments
is it not printing k?
It prints K when the value is 1 but when it changes it dosen't print anything
Use spawn() or coroutines to run the function in a separate thread.
How do I use it and where do I use it?