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 3 years ago
Edited 3 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 3 years ago
01local function onTouch(otherPart)
02 
03    local character = otherPart.Parent
04 
05    if character then
06 
07        local tweenService = game:GetService("TweenService")
08 
09        local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Bounce, Enum.EasingDirection.InOut, 2, true , 0.5)
10 
11        local tween = game:GetService("TweenService"):Create(character,tweenInfo,{
12        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.
13    })
14 
15        tween:Play()
16 
17    end
18 
19end)
Ad

Answer this question