RandomBlox47

Insert object

May 28th, 2022 (edited)
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.81 KB | None | 0 0
  1. -- this script summons an doge model using InsertService
  2. -- see more of my scripts in https://pastebin.com/u/RandomBlox47/1/zzkM755Y
  3. local me = game.Players.RandomBlox47.Character.Head -- local of the player character's head, the "RandomBlox47" can be changed to anything else
  4. local clone = game:GetService("InsertService"):LoadAsset(257489726) -- loads the doge model via InsertService,the number on the last () can be changed to any other model id as long as the game creator or the roblox account owns the model
  5. clone.Parent = workspace -- sets the doge parent to workspace
  6. clone.PrimaryPart = clone.Doge.Torso -- sets Doge Primary part so the next line will work
  7. clone:SetPrimaryPartCFrame(CFrame.new(me.Position.X, me.Position.Y+5, me.Position.Z)) -- sets the CFrame of the Doge primary part to the player position
  8.  
Add Comment
Please, Sign In to add comment