Edit: Ended up just using water lol.
SORRY IM ASKING TOO MANY QUESTIONS. But I have a little gravity test thing I'm working on and I want to rotate the player around slowly, but it glitches a lot. Do I need to add something or change anything? Here is my server script:
local TweenService = game:GetService("TweenService") game.Players.PlayerAdded:Connect(function(p) local char = p.Character or p.CharacterAdded:Wait() local root = char.PrimaryPart while true do local tween = TweenService:Create(root,TweenInfo.new(5),{Rotation = Vector3.new(root.Rotation.X,root.Rotation.Y,root.Rotation.Z + 90)}) tween:Play() tween.Completed:Wait() end end)
And here is a video of what happens:
https://gyazo.com/0b587620317d176eea724a2bd3b36fa1
Micro profiler:
https://gyazo.com/5fd0acb7463b3194ba9a70508e806a04
Any other methods to use besides tweening? Thanks :)
Edit: Tried using a remote event but now it doesnt even move at all
Video: https://gyazo.com/fa7babf42b5e27deaf942e6e8b0db847
Server script:
local TweenService = game:GetService("TweenService") game.Players.PlayerAdded:Connect(function(p) local char = p.Character or p.CharacterAdded:Wait() local root = char.PrimaryPart game.ReplicatedStorage.OSHSJS.OnServerEvent:Connect(function() root.Rotation = Vector3.new(root.Rotation.X,root.Rotation.Y,root.Rotation.Z + 0.001) end) end)
Local script:
game["Run Service"].Heartbeat:Connect(function() script.Parent:FireServer() end)
Consider using remote event, it causes more less lag than tweens. Also if it doesn't work can you show your microprofiler because I wanna see if it's a lag issue?