Hello developers! So I am making a game and I’m a little bit stuck with script… And I want the bed to levitate.
Alright, so what I currently have is this model,
Then this is what makes up the model,
And finally, the video example of how the bed currently works,
I’ve tried looking at script, editing it a bit, my friend tried to find what’s wrong but he didn’t find what might be wrong.
In conclusion, this is the script I currently have,
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
local Point1 ={
Position = Vector3.new(-29.635, 39.8, -45.991);
Orientation = Vector3.new(0, 90, -0.2);
}
local Point2 ={
Position = Vector3.new(-29.635, 39.6, -45.991);
Orientation = Vector3.new(0, 90, 0.3);
}
local tween1 = tweenService:Create(script.Parent.ROOT,tweenInfo,Point1)
local tween2 = tweenService:Create(script.Parent.ROOT,tweenInfo,Point2)
while true do
tween1:Play()
tween1.Completed:Wait()
tween2:Play()
tween2.Completed:Wait()
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.