Advertisement
Anukun_Lucifer

ModelScript

Jan 12th, 2023
1,092
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | Source Code | 0 0
  1. local replicated = game:GetService("ReplicatedStorage")
  2. local model = replicated:FindFirstChild("Dinosoar")
  3.  
  4. local button = script.Parent
  5.  
  6. button.MouseButton1Click:Connect(function()
  7.     if model then
  8.         local newModel = model:Clone()
  9.         newModel.Parent = game.Workspace
  10.         local player = game.Players.LocalPlayer
  11.         local playerHead = player.Character:FindFirstChild("Head")
  12.         if playerHead then
  13.             local position = playerHead.CFrame + playerHead.CFrame.lookVector * 10
  14.             newModel:PivotTo(position)
  15.         end
  16.     end
  17. end)
Tags: Roblox lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement