I’ve recently encountered a bug for tweens which makes the tween ONLY work on the server.
I want the tween to work on all clients, but I don’t want to make a client script as it’s too easy to exploit and other issues.
I know it probably involves remote events, but I jus t can’t seem to find a work around
How would I find a solution to this bug and work around it?
I want to make the script work for the entire server including the clients but make it secure.
If you want more information, here are the scripts:
Rotation script
local tweengoal = {
Orientation = Vector3.new(0,360,0)
}
local tweenservice = game:GetService(“TweenService”)
local part = script.Parent
local tweeninfo = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out, -1, false, 0)
local tween = tweenservice:Create(part,tweeninfo,tweengoal)
tween:Play()
Movement script
local tweenservice = game:GetService(“TweenService”)
local tweeninfo
local part = script.Parent
while true do
task.wait(.5)
print(“done”)
position = script.Parent.Position
goal1 = {
Position = position + Vector3.new(0,0,50)
}
goal2 = {
Position = position + Vector3.new(-50,0,0)
}
goal3 = {
Position = position + Vector3.new(50,0,0)
}
goal4 = {
Position = position + Vector3.new(0,0,-50)
}
local random = math.random(1,4)
tweeninfo = TweenInfo.new(.5,Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
if random == 1 then
tween = tweenservice:Create(part, tweeninfo, goal1)
elseif random == 2 then
tween = tweenservice:Create(part, tweeninfo, goal2)
elseif random == 3 then
tween = tweenservice:Create(part, tweeninfo, goal3)
elseif random == 4 then
tween = tweenservice:Create(part, tweeninfo, goal4)
end
tween:Play()
end
Works on the server but not the clients