Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Keep on getting Unable to cast Vector3 to CoordinateFrame, how to fix?

Asked by
Synth_o 136
5 years ago
local LocalPlayer = game:GetService("Players").LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:wait()

local Orb = game.ReplicatedStorage.Bee
local orbclone = Orb:Clone()
orbclone.Parent = game.Workspace
Orb.Name = "Orb"


local BodyPosition = Instance.new("BodyPosition", orbclone)

while wait(0) do
    orbclone:SetPrimaryPartCFrame(Character.Head.CFrame:pointToWorldSpace(Vector3.new(2, 1, 0)))
end

This script is supposed to make the pet follow the Character's Head when the Character joins the game, but the script right now just spawns the Pet in the part where it was last placed. When I mean when it was last placed, I mean the last place it was before it was moved to ReplecatedsStorage. And now when I run this script, I keep on getting the same error that is: Unable to cast Vector3 to CoordinateFrame. Anyone know how to fix?

Answer this question