Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local c = workspace.CurrentCamera
- local model = game:GetService("InsertService"):LoadAsset(154623465):GetChildren()[1]
- model.Parent = c
- local origin = {}
- for _,v in pairs(model:GetChildren()) do
- origin[v] = v.CFrame
- end
- function update()
- local char = game.Players.LocalPlayer.Character
- if char then
- for _,v in pairs(model:GetChildren()) do
- local success = false
- if v:findFirstChild("Ref") then
- local toPart = char:findFirstChild(v.Ref.Value)
- if toPart then
- success = true
- v.CFrame = toPart.CFrame
- v.BrickColor = toPart.BrickColor
- end
- end
- if not success then
- v.CFrame = origin[v]
- end
- end
- end
- end
- game:GetService("RunService").RenderStepped:connect(update)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement