I have a NumberValue in replicated storage that helps two scripts know when to do stuff, my scripts work but any if statement that has to do with the value or something wont work. Here are the two scripts:
local animation = script:WaitForChild('Animation')
local animation2 = script:WaitForChild('Animation2')
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)
local dance2 = humanoid:LoadAnimation(animation2)
local MuscleOn = game.ReplicatedStorage.MuscleOn
if MuscleOn == 1 then
print("z")
dance:Play()
end
if MuscleOn == 2 then
dance2:Play()
end
local button = script.Parent
local text = button.Parent
local MuscleValue = game.ReplicatedStorage.MuscleOn
text.Text = "Its the hammer, hes real!"
if text.Text == "Its the hammer, hes real!" then
button.MouseButton1Up:Connect(function()
text.Text = "Dudes take my picture-"
end)
end
if text.Text == "Dudes take my picture-" then
button.MouseButton1Up:Connect(function()
text.Text = "-ugh"
MuscleValue.Value = 2
end)
end

1 comment
for some reason the scripts merged when i posted this, the second script starts after line 15