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

I use CFrame to move my sphere for a working gun but it doesnt work??

https://gyazo.com/d0d2004eaab5b0506895ce61f18ce402

So I tried to use CFrame to move a sphere bullet but it claims that CFrame is not a valid member of special mesh, so the bullet doesnt move when I click. What can I use other than CFrame to move the sphere bullet or do i have to rearrange the wording?

1 comment

0

SpecialMesh isn't a part. Only objects that inherit BasePart have the 'Position' property. SpecialMesh is not a BasePart. You probably want to be moving the part that's outside of the SpecialMesh instead.

1 answer

✓ Accepted answer

As what pidgey answered, SpecialMesh is not a BasePart, therefore CFrame is not a valid property for it. You may want to use a normal Part with Shape property being set to Enum.PartType.Ball, or use a part with a SpecialMesh instance as a child instead.

1.

local part = Instance.new("Part")
part.Shape = Enum.PartType.Ball --Turns the part into a spherical object

part.CFrame = CFrame.new(startpos, endpos)
--Extra content goes here

2.

local part = Instance.new("Part")
local specialMesh = Instance.new("SpecialMesh", part)

specialMesh.MeshType = Enum.MeshType.Sphere --As you did
--Now the part should be roundy.
part.CFrame = CFrame.new(startpos, endpos)
--Extra content goes here oof

2 comments

0

since when did pidgey can speak english tho- nvm i luv pokemons

1

https://gyazo.com/e2f4474df4681e18edf5c6d2cb627cda Thank you so much!!!!! You helped me and thats what it looks like now :D

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