I have a script where if a player steps over the object, it will move to a different spot smoothly, but my problem is, I don't know how to change a regular Touched, into a player touch. 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)
Debugging time!
Now, you would use GetPlayers() to acquire certain player(s) like this:
plr = game.Players:GetPlayers("Player1") script.Parent.Touched:connect(function() if script.Parent:FindFirstChild("Humanoid") ~= nil then local human = script.Parent:FindFirstChild("Humanoid") if human.Parent == plr.Character then -- Code here end end end)