I have the following script here, where there is a basepart "Push"
ts = game:GetService("TweenService")
ti = TweenInfo.new(3)
push = script.Parent.Parent.push
weighted = {}
weighted.CFrame = script.Parent.Parent.push.CFrame+Vector3.new(0,10,0)
left = {}
left.CFrame = script.Parent.Parent.push.CFrame
stepped = ts:Create(push,ti,weighted)
unstepped = ts:Create(push,ti,left)
script.Parent.Touched:connect(function(a)
if a.Parent:FindFirstChild("Humanoid") or a.Parent.Name == "block" then
stepped:Play()
end
end)
script.Parent.TouchEnded:connect(function(a)
if a.Parent:FindFirstChild("Humanoid") or a.Parent.Name == "block" then
unstepped:Play()
end
end)
So the problem here is that in the script I want whenever a character or a model named "block" stop touching the block to play the animation "unstepped".
So here is the problem, I tried to let a model named "block" touch the block, but the animation doesn't play.
I think the issue here is that the returning object from ".touched" and ".touchended" is changing through more than one objects. Which is why the animation acts as if it is switching between two animations.
How could I fix this?
Alternatively, how do I make a weight activated button?

1 comment
I'm having a hard time grasping how I could use that method to get my intended results.