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

Animation doesn't load when client fires sever?

Asked by 6 years ago

When my client fires a Remote Event, the server doesn't return any error. When I do fire the event, the first animation never seems to load. There's no indacation in my script that says straight out of the bloom, "Hey, this is an error." Take a look at the server script.

001local PunchEvent = game.ReplicatedStorage:WaitForChild('punch')
002local Cooldown = 0.8
003 
004local PunchData = {}
005local Cooldowns = {}
006 
007local function PlaySound(ID,Parent)
008    local Sound = Instance.new("Sound")
009    Sound.SoundId = "rbxassetid://"..ID
010    Sound.PlayOnRemove = true
011    Sound.Parent = Parent
012    Sound:Destroy()
013end
014 
015function Make(Character)
View all 103 lines...

And here's the client script.

01local Players = game:GetService('Players')
02local ReplicatedStorage = game:GetService('ReplicatedStorage')
03local UserInputService = game:GetService('UserInputService')
04 
05local Player = Players.LocalPlayer
06local PunchEvent = game.ReplicatedStorage.punch
07 
08UserInputService.InputBegan:Connect(function(Key, GameProcessedEvent)
09    if not GameProcessedEvent then
10        if Key.UserInputType == Enum.UserInputType.MouseButton1 then
11            PunchEvent:FireServer()
12        end
13    end
14end)
0
You actually don't need a RemoteEvent to play animations, animations are part of player physics, so they replicate. I'd only use the RemoteEvent for dealing damage. User#19524 175 — 6y
0
So how do I solve my problem? FireyMcBlox 134 — 6y
0
Well I don't think you should be nesting events inside of others, like the Touched events you have. You could make a script, parent under the script, and clone it when the key is pressed from the remote. User#19524 175 — 6y
0
Seems benefical. But, how does this tie in with the animation problem? FireyMcBlox 134 — 6y

1 answer

Log in to vote
-1
Answered by 6 years ago

function square(iteratorMaxCount,currentNumber)

if currentNumber<iteratorMaxCount then currentNumber = currentNumber+1 return currentNumber, currentNumber*currentNumber end

end

for i,n in square,3,0 do print(i,n) end and nowit is more than enough to add the transfer time in seconds transformed into data

2
This has nothing to do with the question. User#19524 175 — 6y
0
^^ FireyMcBlox 134 — 6y
0
yes it does! He just need this to learn ! BlackCheap 14 — 6y
Ad

Answer this question