Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Im trying to make it so if i touch it, it gets bigger but nothing happens any way to fix?

Asked by 2 years ago
Edited 2 years ago

local function onTouch(otherPart)

local character = otherPart.Parent

if character then

local tweenService = game:GetService("TweenService")

local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Bounce, Enum.EasingDirection.InOut, 2, true , 0.5) local man = {CFrame = CFrame.new(20, 20 , 20)}

tweenInfo:Play()

end end

1 answer

Log in to vote
0
Answered by 2 years ago
local function onTouch(otherPart)

    local character = otherPart.Parent

    if character then

        local tweenService = game:GetService("TweenService")

        local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Bounce, Enum.EasingDirection.InOut, 2, true , 0.5) 

        local tween = game:GetService("TweenService"):Create(character,tweenInfo,{
        CFrame = CFrame.new(20, 20 , 20) --Currently i'm assuming the thing you want to enlarge is the character, so i put character as the first parameters. ELSE, change character to the part you want to enlarge.
    })

        tween:Play()

    end

end)
Ad

Answer this question