I have a script where when someone walks on it, it will move to a specific spot, but when I boot up the game, it will completely ignore the touched function and automatically run the whole script.
local TweenService = game:GetService("TweenService")
local part = workspace.ManholeCover
part.Position = Vector3.new(-30.713, 285.446, -9.8)
part.Anchored = true
part.Parent = game.Workspace
function MovePart()
local goal = {}
goal.Position = Vector3.new(-27.313, 285.446, -9.8)
local tweenInfo = TweenInfo.new(10)
local tween = TweenService:Create(part, tweenInfo, goal)
tween:Play()
end
workspace.ManholeCover.PartTouch.Touched:connect(MovePart)

1 comment
how would i correctly apply this into my script though?