Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

Help me fix an error

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!

Bratlolka2

New Member
Reputation: 0 / 0 / 0
Nov 25, 2021
2
0
1
Roblox
Bratlolka2
Hello,
I am making a game but i have an error and i don't know how to fix it.
The error is: SetPrimaryPartCFrame is not a valid member of Accessory "Workspace.Bratlolka2.MeshPartAccessory"

And Here Is the Code:


local Pad = game.Workspace.Map.TeleportPad



while true do

wait(0.3)

if game.ServerStorage.StartingRound.Value == true then



script.Parent.Touched:Connect(function(touchPart)

if touchPart and touchPart.Parent then

local character = touchPart.Parent

local teleportLocation = CFrame.new(Pad.CFrame.X, Pad.CFrame.Y + 5, Pad.CFrame.Z)

local SMGClone = game.Workspace.SMG:Clone()

SMGClone.Parent = game.StarterPack

character:SetPrimaryPartCFrame(teleportLocation) - the error is coming from here

wait(3)

end

end)

end

end

If you know how to fix it, Thank you so much
Bye!