Hello Roblox Dev Community,
Info
I am creating an tween when i step on a block.
Footage
Footage
--{ Variables }--
local plrs = game:GetService("Players")
local plr = plrs.LocalPlayer
local shop = workspace.ShopHitbox
local frame = script.Parent.Frame
--{ Functions }--
shop.Touched:Connect(function(hit)
wait(.01)
if plrs:FindFirstChild(hit.Parent.Name) then
frame:TweenPosition(
UDim2.new(0, 0, 0 ,0),
Enum.EasingDirection.In,
Enum.EasingStyle.Quad,
.5,
true,
false
)
end
end)
shop.TouchEnded:Connect(function(hit)
wait(.01)
if plrs:FindFirstChild(hit.Parent.Name) then
frame:TweenPosition(
UDim2.new(-1, 0, 0, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quad,
.5,
true,
false
)
end
end)
Unable to cast value to function - Client - Main:26
What happens
It gives me an error what i showed before and does nothing else.
I would really appericiate any help,
I hope ur having an good day!
Cya