Hello there users of devforum. I have made this script for the players to get on the lift and start moving to a different direction. Though I got the tweening script done, the welding part of it doesn’t seem to work and just happens to leave the player behind. Im also encountering this second error of the lift just not moving at all for some reason. Ideas?
(editting for boost
script.Parent.Parent.real.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local char = hit.Parent
local RootPart = char:WaitForChild("HumanoidRootPart")
local weld = Instance.new("WeldConstraint", workspace)
script.Parent.ClickDetector.MouseClick:Connect(function()
if IsAtPos == false then
IsAtPos = true
local starttween = tweenservice:Create(realpart, infotween, tweenconfig)
starttween:Play()
weld.Part0 = RootPart
weld.Part1 = script.Parent
else
IsAtPos = false
local returntween = tweenservice:Create(realpart, infotween, tweenreturn)
returntween:Play()
weld:Destroy()