✓ Accepted answer
I'm assuming that you have two function
local function tweenUp() --tween here-- end
and
local function tweenDown() --tween here-- end
Well if you did have two functions, then you are calling it incorrectly.
It's supposed to be tweenUp() and tweenDown if you want a function to be called
Always remember that code is gonna be ran from the top to the final line of code,
Also make sure that your script is a Global Script, not a local script(That is very important!)
Here's an example
print("Hi")
wait(1)
print("Bye")
Same thing with events!
So if you clicked on something,
Everything in that event will be done
Then you do the next event
local clickdetector = game:GetService(Workspace):FindFirstChild("D1"):FindFirstChild("ClickDetector")
local function tweenUp()
end
local function tweenDown()
end
clickdetector.MouseClick:Connect(function()
tweenUp()
end)
clickdetector.MouseClick:Connect(function()
tweenDown()
end)
If you wanted to do it all in one click you would do something like this
local function tweenUp()
end
local function tweenDown()
end
clickdetector.MouseClick:Connect(function()
tweenUp()
wait(1)
tweenDown()
end)
Hopefully this is a great explanation of how to fix this
1 comment
not even..