I’m trying to tween the text size when the ray detects a player. But It’s not working… How exactly do I tween the Text size?
local TextLabel = game:GetService("StarterGui").ScreenGui1.Frame.TextLabel
local info = TweenInfo.new(
3,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
0,
true,
0
)
goal = {
Size = UDim2.new({0, 2},{0, 2})
}
local TweenCreate = TweenService:Create(TextLabel, info, goal) -- FInish Later
print("ok")
while wait() do -- Infinite loop
local Ray = workspace:Raycast(Origin.Position, Direction, rayCastParams) -- Calling the rayCast with all the neccessary requirements. Similiar to RayCast
if Ray then -- If ray is true then..
print(Ray)
if Ray.Instance.Parent == character then -- If ray is hitting the character then
local rayDistance = (Origin.Position - Ray.Position).Magnitude -- Dont yet fully understand.
warn("Distance:", rayDistance)
Status.Value = "Detected "..player.Name
TweenCreate:Play()```