Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- where = Instance.new("RemoteEvent", owner.Character)
- where.Name = "whereat"
- NLS([[
- where = owner.Character:WaitForChild("whereat")
- local mouse = owner:GetMouse()
- mouse.Button1Down:connect(function()
- where:FireServer()
- end)
- mouse.Button1Up:connect(function()
- where:FireServer()
- end)
- ]],owner.PlayerGui)
- part1 = Instance.new("Part", game.Workspace)
- part1.Anchored = false
- part1.Transparency = 0.5
- part1.CanCollide = false
- on = 0
- local bp2 = Instance.new("BodyPosition",part1)
- bp2.D = 100
- bp2.P = 10000
- local target
- function wherepart(plr, pos)
- on = on + 1
- if on == "1" then
- pos.Position = pos.Position * 10
- elseif on == "2" then
- pos.Position = pos.Position * -10
- weld:Destroy()
- wait(0.1)
- on = 0
- end
- end
- for i,v in pairs(owner.Character:GetDescendants()) do
- if v:IsA("BasePart") then
- ownerparts = v
- end
- end
- function touched()
- if target ~= ownerparts then
- weld = Instance.new("WeldConstraint")
- weld.Parent = workspace
- weld.Part0 = part1
- weld.Part1 = target
- end
- end
- part1.Touched:Connect(touched)
- where.OnServerEvent:Connect(wherepart)
- while true do
- task.wait()
- bp2.position = owner.Character.Head.Position
- end
Add Comment
Please, Sign In to add comment