lV0rd
(Tin)
September 24, 2022, 5:26pm
#1
-- Services --
local ReplicatedStore = game:GetService("ReplicatedStorage")
local playerService = game:GetService("Players")
-- Variables --
local OnTapEvent = ReplicatedStore:WaitForChild("OnTap")
local player = playerService.LocalPlayer
local button = script.Parent
-- Events --
button.MouseButton1Down:Connect(function()
script.Parent:TweenSize(UDim2.new(0.114, 0, 0.206, 0), "Sine", "Out", .2, true)
OnTapEvent:FireServer(player)
end)
button.MouseButton1Up:Connect(function()
script.Parent:TweenSize(UDim2.new(0.107, 0, 0.196, 0), "Sine", "In", .2, true)
end)
I don’t understand what is wrong with this code…
Geolio9
(Tomate)
September 24, 2022, 5:27pm
#2
Don’t have time to try my solution, but I think Sine might be the issue. Try using Enum.EasingStyle.Sine instead. Also try it with the easing direction (Enum.EasingDirection.In)
lV0rd
(Tin)
September 24, 2022, 5:28pm
#3
I’ll try, but Isn’t using “Sine” the same thing as Enum.EasingStyle.Sine?
Edit: didn’t change anything it still is buggy
OwlCodes
(Owl)
September 24, 2022, 5:29pm
#4
Show us the new script, please.
lV0rd
(Tin)
September 24, 2022, 5:29pm
#5
It’s just “Sine” replaced with Enum.EasingStyle.Sine
Geolio9
(Tomate)
September 24, 2022, 5:30pm
#6
Replace the “In” and “Out” with the enum equivalents. I think that is the issue with your code as there is not any other strings that should cause errors.
OwlCodes
(Owl)
September 24, 2022, 5:31pm
#7
No, it’s totally different.
It is asking for a EasyingStyle datatype, not a string.
More information found here
1 Like
lV0rd
(Tin)
September 24, 2022, 5:31pm
#9
Bro that wouldn’t do anything… “Sine” is the same with Enum.EasingStyle.Sine aswell as “In” with Enum.EasingDirection.In and etc
lV0rd
(Tin)
September 24, 2022, 5:32pm
#10
I just changed it anyway in the script, and sadly it still hasn’t been fixed
OwlCodes
(Owl)
September 24, 2022, 5:32pm
#11
Show us the new script… so we can see.
Geolio9
(Tomate)
September 24, 2022, 5:33pm
#12
What line is it talking about exactly? Also, is this the entire script?
lV0rd
(Tin)
September 24, 2022, 5:33pm
#13
Sure here you go:
-- Services --
local ReplicatedStore = game:GetService("ReplicatedStorage")
local playerService = game:GetService("Players")
-- Variables --
local OnTapEvent = ReplicatedStore:WaitForChild("OnTap")
local player = playerService.LocalPlayer
local button = script.Parent
-- Events --
button.MouseButton1Down:Connect(function()
script.Parent:TweenSize(UDim2.new(0.114, 0, 0.206, 0), Enum.EasingStyle.Sine, Enum.EasingDirection.Out, .2, true)
OnTapEvent:FireServer(player)
end)
button.MouseButton1Up:Connect(function()
script.Parent:TweenSize(UDim2.new(0.107, 0, 0.196, 0), Enum.EasingStyle.Sine, Enum.EasingDirection.In, .2, true)
end)
Geolio9
(Tomate)
September 24, 2022, 5:34pm
#15
I figured… What line is that? the markdown doesn’t have line numbers.
lV0rd
(Tin)
September 24, 2022, 5:34pm
#16
Could you explain what you mean please?
Geolio9
(Tomate)
September 24, 2022, 5:35pm
#17
What is the actual code on the line? I don’t know what line 12 or 18 are.
lV0rd
(Tin)
September 24, 2022, 5:36pm
#18
Line 12:
script.Parent:TweenSize(UDim2.new(0.114, 0, 0.206, 0), Enum.EasingStyle.Sine, Enum.EasingDirection.Out, .2, true)
Line 18:
script.Parent:TweenSize(UDim2.new(0.107, 0, 0.196, 0), Enum.EasingStyle.Sine, Enum.EasingDirection.In, .2, true)
Geolio9
(Tomate)
September 24, 2022, 5:38pm
#19
I couldn’t tell you what is wrong. Is it still the same error?
Pegagittt
(Pegagit)
September 24, 2022, 5:38pm
#20
You have your EasingSytle and Easing Direction in the wrong Position, replace Out with Sine and Sine with Out.
2 Likes