Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make a model face the same way of the player?

this is the script i am using (but i don't know to solve the problem)

local Tool = script.Parent;

local usable = true

local player = game.Players.LocalPlayer

  

Tool.RemoteEvent.OnServerEvent:Connect(function(Player)

if usable then

usable = false

player = script.Parent.Parent

  

local model = game.ReplicatedStorage.Frog:Clone()

model.Parent = player

model:SetPrimaryPartCFrame(player.Torso.CFrame + Vector3.new(20,10,3))

  

  

wait(15)

model:Destroy()

wait(15)

usable = true

end

end)

1 answer

If you give the PrimaryPart the exact CFrame of the RootPart (Or Torso) it will face the same direction and have the same position as it.

Frog:SetPrimaryPartCFrame(Character.Humanoid.RootPart.CFrame)

You can mess around with adding vector3s together to change it from clipping into the RootPart.

Frog:SetPrimaryPartCFrame(RootPart.CFrame + Vector3.new(0, 5, 0))

Something like this might be of help.

This discussion is preserved as it was. New answers, comments, and votes are closed.