Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Motor issues when using FilteringEnabled?

Asked by 9 years ago

What I'm trying to do is create a custom character with custom animations. There will be Server Animations which are visible to everyone, but then are removed locally from the local player. Instead the local player sees Local Animations which; because are created/run locally, they run at 60fps.

Firstly it clones the local setup script to the player, and fires an event telling it to respond:

if game.Workspace.FilteringEnabled then --If you use filtering enabled, create local animations.
local LAS=script.LocalAnimationsSetup:clone() LAS.Parent=char wait() LAS.Disabled=false
game.Workspace.ReplicationEvent:FireClient(player)

In the local Script it then clones the animations and renames them "LocalAnimation" which are now only visible to that player due to FilteringEnabled being set to true.

game.Workspace.ReplicationEvent.OnClientEvent:connect(function() --Duplication
local LocalAnimations=script.Parent.Animations:clone() LocalAnimations.Name="LocalAnimations" 
LocalAnimations.Parent=script.Parent wait()
game.Workspace.ReplicationEvent.Return:FireServer(game.Players.LocalPlayer) end)

I then generate the motors locally (via that local script) and for the server (via the setup script in ServerScriptService): which works successfully for the local script only. Screenshot: http://prntscr.com/73e79j

This is where the issue comes in for the local animations, for some reason the motors only work when I anchor a brick - anywhere in the player. Shown here: https://pbs.twimg.com/tweet_video/CEldqoyWIAADrY1.mp4 [Copy and paste the link above, it doesn't recognise it]

Besides this issue the server animations create their motors, yet decide to fail to act as a weld, even though they're set up perfectly. (I know I've done it correctly, I use motors alot.)

Any help would be appreciated, thanks!

1 answer

Log in to vote
0
Answered by 9 years ago

First and foremost, brilliant thinking with the local animations.

Secondly, I think I've encountered this issue before.

Create a 'local torso' of sorts: a completely invisible, local-part torso welded onto the original torso. Create your joints around that.

Ad

Answer this question