#Not Working :(

1 messages · Page 1 of 1 (latest)

waxen cove
#

this is supposed to run on my m1 or left click, but it isn't and I don't see why.

waxen cove
#

I dont know whaat that issue means

#

i dont think the character is being loaded, but I cant figure out why.

#

I also dont know where else to look to see if character is initialized or not somewhere else in the game

rugged shuttleBOT
#

studio** You are now Level 1! **studio

strong violet
#

not server

waxen cove
#

ok

#

wait where

strong violet
#

change it to LocalScript

#

also here its :FireServer()

waxen cove
#

where do I change it to local script

strong violet
#

wym 😭

strong violet
waxen cove
#

how bro, ive been doing this for an hour total, i dont know where or how to dooo thattt

waxen cove
#

so this

#

?

strong violet
#

oh wait

strong violet
#

in explorer

waxen cove
#

im looking for anywhere that says SCRIPT BUT THERES NOWHERE THAT SAYS IT

strong violet
#

bro 😭

waxen cove
#

the only script i have is combat

strong violet
#

replace this "Combat" with local script

strong violet
waxen cove
#

like this?

strong violet
#

ye

waxen cove
#

and would this need to be local script aswell

strong violet
#

no

waxen cove
#

okay

#

it still isnt working in game

strong violet
#

yep

#

Humanoid.Animator:LoadAnimation(script.Animations.M1)

strong violet
waxen cove
strong violet
#

yeah

waxen cove
#

okay it is running the event but not the animation

strong violet
#

game.ReplicatedStorage:WaitForChild("MainEvent"):FireServer()

#

its better to make a variable for an event

waxen cove
#

so like this?

rugged shuttleBOT
#

studio** You are now Level 2! **studio

waxen cove
strong violet
waxen cove
#

so its working now

#

but the animation isnt playing

strong violet
#

then smth wrong with your animation

waxen cove
#

do I need the rbxassetid in front of the id

strong violet
#

nah

strong violet
#

i mean try 😭

waxen cove
strong violet
waxen cove
#

local UIS = game:GetService("UserInputService")

local plr = game.Players.LocalPlayer
local Character = plr.Character or plr.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local M1 = Humanoid.Animator:LoadAnimation(script.Animations.M1)
UIS.InputEnded:Connect(function(I,E)
if E then return end
if I.UserInputType == Enum.UserInputType.MouseButton1 then
print("punch")
game.ReplicatedStorage:WaitForChild("MainEvent"):FireServer()
M1:Play()
end
end)

#

can I download it as a file instead

strong violet
#
local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local Character = plr.Character or plr.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local M1 = Humanoid:WaitForChild("Animator"):LoadAnimation(script.Animations.M1)
local remote = game:GetService("ReplicatedStorage"):WaitForChild("MainEvent")

UIS.InputEnded:Connect(function(I,E)
    if E then return end
    if I.UserInputType == Enum.UserInputType.MouseButton1 then
        print("punch")
        remote:FireServer()
        M1:Play()
    end
end)
waxen cove
#

sorry im not good at this, ive never done anything reguarding scripting before, i kinda just looked up a scripting tutorial video for roblox studio

#

I fixxed it

#

I had to make main event part of replicated stoage

waxen cove
#

I need help again

#

How would I tell this to remove the old hitbox after a certain ammount of time

#

nvm i fixed it