Help with Devil Fruit Script

Hey devs! I made a box fruit script with an animation but it seems that when it’s not in starter pack it works, and when it’s in starter pack it doesn’t work. The error is on line 4 on this screen shot. I am new to scripting so I don’t know how to fix this. Help is appreciated!

(The red line is the error if you didn’t know)

1 Like

As sometimes the player scripts load in too fast, the character may not exist yet, or has been improperly defined.
it should be defined like this

local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
1 Like

It seemed to have no errors but now there is a error on line 14.

Did you delete the useAnimation bit? No need to crop out half of the code as it is harder to figure out the problem for you

Oh yeah I don’t know why I did that. It works thanks!