Error in position
local part = Instance.new("Part",workspace) local d = Instance.new("Decal",part) part.TopSurface="Smooth" part.BottomSurface="Smooth" part.Anchored=true part.Size=Vector3.new(5,5,1) part.CFrame=CFrame.new(0,50,0) part.Position=(0,0,0) while wait() do part.CFrame = part.CFrame * CFrame.Angles(0,0,1/10) end
Lol, this was from my math.random explanation. But anyway, you need to change the value to either a Vector3, or a CFrame. If you're changing it to a CFrame, you'll need to access the CFrame property of the part.
Here:
local part = Instance.new("Part",workspace local d = Instance.new("Decal",part) part.TopSurface="Smooth" part.BottomSurface="Smooth" part.Anchored=true part.Size=Vector3.new(5,5,1) part.CFrame=CFrame.new(0,0,0) while wait() do part.CFrame = part.CFrame * CFrame.Angles(0,0,1/10) end
TheDeadlyGuest4 said something similar, but his example was flawed with a lowercase "f" in "CFrame", and not changing the "part.Position" to "part.CFrame".
Does the part spawn in the middle? If so, Its because your position is set 0 0 0 which is in the middle of the baseplate for example, I can help you more if you give me more detail on how it is erroring.
You need to use vector3.new or CFrame.new
local part = Instance.new("Part",workspace local d = Instance.new("Decal",part) part.TopSurface="Smooth" part.BottomSurface="Smooth" part.Anchored=true part.Size=Vector3.new(5,5,1) part.CFrame=CFrame.new(0,50,0) part.Position= CFrame.new(0,0,0) while wait() do part.CFrame = part.CFrame * CFrame.Angles(0,0,1/10) end
This should work
local part = Instance.new("Part",workspace) local d = Instance.new("Decal",part) part.TopSurface="Smooth" part.BottomSurface="Smooth" part.Anchored=true part.Size=Vector3.new(5,5,1) part.CFrame=CFrame.new(0,50,0) part.Position = Vector3.new(0,0,0) while wait() do part.CFrame = part.CFrame+Vector3.new(0,0,1/10) end