im trying to set the orientation of the newplatform to have it tilted slightly but in line 18 it says I have to change it to local??? why doesnt
newplatform.Orientation = newplatform.Orientation + CFrame.new(-25, 0, 0) work?
Am i just stupid or is this like the easiest thing in the world. lol
here’s the script, pretty straight foward
local TweenService = game:GetService("TweenService")
local platform = game.ServerStorage.Platforms.Platform
local target = script.Parent.Target
local tweenInfo = TweenInfo.new(
5,-- time
Enum.EasingStyle.Linear, -- easing style
Enum.EasingDirection.In, -- easing direction
1, -- repeat count
false, -- reverses
0 -- delay time
)
function SpawnTween()
local newPlatform = platform:Clone()
newPlatform.Parent = script.Parent.Platforms -- folder for where the peices go
newPlatform,Orientation = newPlatform,Orientation + CFrame.new(-25, 0, 0)
newPlatform.CFrame = script.Parent.CFrame -- sets the "spawn" point of the platform
local tween = TweenService:Create(newPlatform, tweenInfo, {Position = target.Position})
tween:Play()
wait(5)
newPlatform:Destroy()
end
while true do
spawn(function()
SpawnTween()
end)
wait(2)
end
local TweenService = game:GetService("TweenService")
local platform = game.ServerStorage.Platforms.Platform
local target = script.Parent.Target
local tweenInfo = TweenInfo.new(
5,-- time
Enum.EasingStyle.Linear, -- easing style
Enum.EasingDirection.In, -- easing direction
1, -- repeat count
false, -- reverses
0 -- delay time
)
function SpawnTween()
local newPlatform = platform:Clone()
newPlatform.Parent = script.Parent.Platforms -- folder for where the peices go
newPlatform,Orientation = newPlatform.Orientation + CFrame.new(-25, 0, 0)
newPlatform.CFrame = script.Parent.CFrame -- sets the "spawn" point of the platform
local tween = TweenService:Create(newPlatform, tweenInfo, {Position = target.Position})
tween:Play()
wait(5)
newPlatform:Destroy()
end
while true do
spawn(function()
SpawnTween()
end)
wait(2)
end