#M1 system confusion/ help wanted

1 messages · Page 1 of 1 (latest)

lilac flicker
#

So I am making a M1 system for my RPG game and I wanted the players like Noob or Guest to have their own M1 the problem is when I become them the M1 system stops working here is a video on the problem. I am new to coding still so I am like 85% sure I am missing like a whole script for this to work but here is my explorer tab too.

#

the anim is just a test anim too

lilac flicker
#

heres where they are located

boreal crow
#

show me the script that you use to replace the player's character, not the m1

lilac flicker
#

give me a second to find it

#

it is in serverscriptservice

boreal crow
#

I dont believe that's the correct way of applying a new charactermodel

#
#

try looking into this if it doesn't help let me know

lilac flicker
#

Before I do will this screw up my roster page bc I have it so if it finds a image button with a character model with the same name and let me change it. Ps I just saw the message

vivid dome
#

dont put the script

#

in character scripts

#

put it in serverscripts

#

I assume you got this code from this one youtber

#

youtuber*

#

also

#

whenever u die

#

anything inside characterscipts resets

lilac flicker
#

Yes it is somewhat temp till I can find a way around it but when I die it puts me as my actual avatar again

vivid dome
#

gimme a min

#

lemme check one thing

#

I think I know the issue

lilac flicker
#

what is it?

vivid dome
#

no nvm

#

does the bindable

#

fire?

lilac flicker
#

you mean for the M1 script im assuming if so its 50/50 it only works before I change to like noob or someone else

vivid dome
#

like when u press m1 does the server script work

#

lemme js

#

read rq

#

can u just copy the scripts

#

and send here

#

like not the code

#

just the script itself

#

M1 script and InputManager

#

send me it as file

lilac flicker
#

the morph script?

void patrolBOT
#

studio** You are now Level 3! **studio

vivid dome
#

no

#

M1 and Inputmanager

lilac flicker
vivid dome
#

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local animationsfolder = ReplicatedStorage:WaitForChild("Animations")

local Players = game:GetService("Players")
local player = Players.LocalPlayer
local char = script.Parent.Parent
local hum = char:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")

local m1sPerformed = 0

local currentM1 = 0

local m1Debounce = false

local comboEndCooldown = 1

local waitBeforeReset = 1

Bindfunc.OnInvoke = function()
    if not m1Debounce then
        m1Debounce = true
        
        m1sPerformed += 1
        currentM1 += 1
        
        local correspondingM1anim = animationsfolder:FindFirstChild("Animation 1")
        
    local m1Track = animator:LoadAnimation(correspondingM1anim)
        
        m1Track:Play()
        
        task.wait(m1Track.Length - 0.1)
        
        task.spawn(function()
            
            local oldM1sPerformed = m1sPerformed
            
            task.wait(waitBeforeReset)
            
            if oldM1sPerformed == m1sPerformed then
                
                currentM1 = 0
                
            end
            
        end)
        
        if currentM1 == 3 then
            
            task.wait(comboEndCooldown)
            
            currentM1 = 0
            
        end
        
        m1Debounce = false
        
    end
    
end``` try this
#

this is the M1 script

lilac flicker
#

It works on my main model but when I change to noob I get nothing happening

vivid dome
#

uh

#

u get any errors?

lilac flicker
#

i dont think I did but ill check

#

nope

lilac flicker
sage glade
#

this m1 system is very familiar

#

forgot which one

lilac flicker
#

I got it from a tut on yt

flat arch
lilac flicker
flat arch
#

if u can come dms

lilac flicker