Hello, I have this problem when where your cursor doesn’t leave the frame before entering a new frame the other frame overlaps the other!
Any help would be appreciated
here is the module dev forum page: Spring-driven motion - spr
module API: GitHub - Fraktality/spr: Spring-driven motion library
Game file:
springmotion.rbxl (61 KB)
local spr = require(script.Parent.ModuleScript)
local frame = script.Parent.Simple
local button = script.Parent.TextButton
frame.Blue.MouseEnter:Connect(function()
spr.target(frame.Blue, 0.6, 4, {
Size = UDim2.fromScale(0.4,1.6)
})
spr.target(frame.Red, 0.6, 4, {
Position = UDim2.fromScale(0.575, 0.8)
})
spr.target(frame.Green, 0.6, 4, {
Position = UDim2.fromScale(0.825, 0.8)
})
end)
frame.Blue.MouseLeave:Connect(function()
spr.target(frame.Blue, 0.6, 4, {
Size = UDim2.fromScale(0.25,1.6)
})
spr.target(frame.Red, 0.6, 4, {
Position = UDim2.fromScale(0.5, 0.8)
})
spr.target(frame.Green, 0.6, 4, {
Position = UDim2.fromScale(0.75, 0.8)
})
end)
frame.Green.MouseEnter:Connect(function()
spr.target(frame.Blue, 0.6, 4, {
Position = UDim2.fromScale(0.175, 0.8)
})
spr.target(frame.Red, 0.6, 4, {
Position = UDim2.fromScale(0.425, 0.8)
})
spr.target(frame.Green, 0.6, 4, {
Size = UDim2.fromScale(0.4,1.6)
})
end)
frame.Green.MouseLeave:Connect(function()
spr.target(frame.Blue, 0.6, 4, {
Position = UDim2.fromScale(0.25, 0.8)
})
spr.target(frame.Red, 0.6, 4, {
Position = UDim2.fromScale(0.5, 0.8)
})
spr.target(frame.Green, 0.6, 4, {
Size = UDim2.fromScale(0.25,1.6)
})
end)
frame.Red.MouseEnter:Connect(function()
spr.target(frame.Blue, 0.6, 4, {
Position = UDim2.fromScale(0.175, 0.8)
})
spr.target(frame.Red, 0.6, 4, {
Size = UDim2.fromScale(0.4,1.6)
})
spr.target(frame.Green, 0.6, 4, {
Position = UDim2.fromScale(0.825,0.8)
})
end)
frame.Red.MouseLeave:Connect(function()
spr.target(frame.Blue, 0.6, 4, {
Position = UDim2.fromScale(0.25, 0.8)
})
spr.target(frame.Red, 0.6, 4, {
Size = UDim2.fromScale(0.25,1.6)
})
spr.target(frame.Green, 0.6, 4, {
Position = UDim2.fromScale(0.75,0.8)
})
end)