help me with hold the tweened
local uis=game:GetService("UserInputService")
uis.InputBegan:connect(function(input)
if input.KeyCode==Enum.KeyCode.W then
obj:TweenSizeAndPosition(
UDim2.new(0, 200, 0, 200),
UDim2.new(0.5, 0, 0.512, 0),
3,
"Out",
"Linear",
false,
0
)
print("hi")
end
end)
uis.InputEnded:connect(function(input)
if input.KeyCode==Enum.KeyCode.W then
obj:TweenSizeAndPosition(
UDim2.new(0, 100, 0, 100),
UDim2.new(0.5, 0, 0.5, 0),
3,
"Out",
"Linear",
false,
0
)
print("bye")
end
end)```
Located inside Screen gui then frame inside it local script
1 Like
flojo007_fs
(flojo007_fs)
September 26, 2021, 5:14pm
#2
What exactly is the issue with your script?
Idk its just dosnt work for me
flojo007_fs
(flojo007_fs)
September 26, 2021, 5:38pm
#4
Is that the full script / what is it supposed to do?
Yeah look at the location of the script
tyrencia
(tyrone)
September 26, 2021, 5:40pm
#6
What errors come up in your output?
It’s about the function thing idk
tyrencia
(tyrone)
September 26, 2021, 5:45pm
#8
Can you copy and paste it here for us to see? It’ll help us understand the problem better.
achdef
(blue)
September 26, 2021, 5:48pm
#9
Look, if you want your script to be solved, you really need to help @tyrencia and me. Else we can’t really help you out with this issue.
is that a gui tween script or what?
1 Like
Yes it is a gui tween like I mentioned at the top of the topic
try this;
local uis=game:GetService("UserInputService")
uis.InputBegan:connect(function(input)
if input.KeyCode==Enum.KeyCode.W then
obj:TweenSizeAndPosition(
UDim2.new(0, 200, 0, 200),
UDim2.new(0.5, 0, 0.512, 0),
"Out",
"Linear",
0
)
print("hi")
end
end)
uis.InputEnded:connect(function(input)
if input.KeyCode==Enum.KeyCode.W then
obj:TweenSizeAndPosition(
UDim2.new(0, 100, 0, 100),
UDim2.new(0.5, 0, 0.5, 0),
"Out",
"Linear",
0
)
print("bye")
end
end)
1 Like
What’s the difference between the original and yours?
what was this exactly for? lol
btw, the script i edited above should work now
Umm thx for now but I will test it later
Jetdevv
(Dreadmania)
September 26, 2021, 6:18pm
#16
I’m pretty sure you are supposed to use Enum.EasingStyle.Linear, and Enum.EasingDirection.Out.
Really I’m not sure bc I’m not on my pc now
Jetdevv
(Dreadmania)
September 26, 2021, 6:24pm
#18
LAZY_DAISY001:
local uis=game:GetService("UserInputService")
uis.InputBegan:connect(function(input)
if input.KeyCode==Enum.KeyCode.W then
obj:TweenSizeAndPosition(
UDim2.new(0, 200, 0, 200),
UDim2.new(0.5, 0, 0.512, 0),
3,
"Out",
"Linear",
false,
0
)
print("hi")
end
end)
uis.InputEnded:connect(function(input)
if input.KeyCode==Enum.KeyCode.W then
obj:TweenSizeAndPosition(
UDim2.new(0, 100, 0, 100),
UDim2.new(0.5, 0, 0.5, 0),
3,
"Out",
"Linear",
false,
0
)
print("bye")
end
end)
The final argument you entered is incorrect, you are supposed to enter a function to call there. Also, it is not required to enter that. Same goes for the third argument, that’s supposed to be a EasingDirection.
Jetdevv
(Dreadmania)
September 26, 2021, 6:25pm
#19
I’m pretty sure this would just instantly move the UI, since you are just entering 0 as the time.
uhm- can’t he just change it to 1?