#smooth positioning

1 messages · Page 1 of 1 (latest)

crystal sundial
#

i need to know how i can make the camera move to the target cframe smoothly instead of just snap to the cframe pos, heres the code

#
local shop = false

script.Parent.shop.Activated:Connect(function(input:InputObject)  
    if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
        if shop == false then
            shop = true
            workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
            workspace.CurrentCamera.CFrame = workspace["shop camera"].CFrame
            script.Parent.shop.Text = "Exit shop"
            local random = math.random(1, 5)
            if random == 1 then
                game:GetService("TextChatService"):DisplayBubble(workspace.shop["anim rig"].Head, "what do you need?")
            elseif random == 2 then
                game:GetService("TextChatService"):DisplayBubble(workspace.shop["anim rig"].Head, "do us both a favor, make this quick.")
            elseif random == 3 then
                game:GetService("TextChatService"):DisplayBubble(workspace.shop["anim rig"].Head, "switching things?")
            elseif random == 4 then
                game:GetService("TextChatService"):DisplayBubble(workspace.shop["anim rig"].Head, "give me all your tix")
            elseif random == 5 then
                game:GetService("TextChatService"):DisplayBubble(workspace.shop["anim rig"].Head, "dont have all day")
            end
        else
            shop = false
            workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
            script.Parent.shop.Text = "Shop"
        end
    end
end)
crude seal
crystal sundial
#

ok

#

ill try

#

that