#code-discussion
1 messages · Page 233 of 1
Click on the screen gui and turn on ignore gui inset
I'm not sure then it could probably be the scale or position aswell
holy optimization 🥹
shoulda used task.wait(), not a real scripter fr
most optimized script of all time
hey, does roblox have 2d ads? or only 3d immersive ones?
this script dont work, doesnt do dmg or chase, its a chasing script for an npc any1 tryna help
local NPC = script.Parent
local NHRP = NPC.HumanoidRootPart
local NH = NPC.Humanoid
local cd = false
NPC.Touched:Connect(function(hit)
local character = hit.Parent
local player = game.Players:GetPlayerFromCharacter(character)
if player and not cd then
cd = true
local H = character:FindFirstChild("Humanoid")
H.Health = H.Health - 15
task.wait(1.5)
cd = false
end
end)
while true do
task.wait(0.1)
for _, player in pairs(game.Players:GetPlayers()) do
local character = player.Character
local PHRP = character:FindFirstChild("HumanoidRootPart")
local distance = (PHRP.Position - NHRP.Position).Magnitude
if distance < 31 then
NH:MoveTo(PHRP.Position)
end
end
end
erm what da helly, why is wait() even a thing then
just make task.wait() the new wait() 🥀
but ig that could maybe mess up old games or smth idk lol
nvm I js replaced while true do with RunService
making more progress on my game
- shop & pack opening system / locker room (character customization)
- game loop and ball mechanics
ok
same bro same
requires 1 million years of experience, would hire!!!
please keep all hiring/commissions to the marketplace #marketplace-info ty
You are the chosen one of optimisations
On spin lowkey add some sort of reward sound effects and vfx
W
optimization goat 🔥🔥🔥🔥 (i would script the same way)
Do prints, review code line to line and imagine how it all executes, find the place where the problem occurs, don't just dump code and hope someone will tell you the problem. Debugging is your own task.
Yo be quiet
Bum
It wasn’t working At all
Like
Chase wasn’t running
So how am I supposed to put prints
U can Litterally ask for help for a reason
Then tell the details of the problem, like ask why going from this line script just doesn't continue working, add a print to showcase that this exact print doesn't work.
Good, but still debug and explain the problem in detail when you Find it.
💀
g
how
i could @static forum
?
prevent what
how can i get all characters on a loop?
like i wanna for i,v in game.Players:GetChildren() do
but with characters not players
oh i can just do that and do v.character
the pixels moving out of frame
I need help adding my gun animation to my Roblox game
And I don’t know how to script
Is react lua worth learning?
how can i make a humanoid:MoveTo() function stop mid way?
I need help adding my gun animation to my Roblox game
for _, v in Players:GetPlayers() do
print(v.Character)
end
yeah i figured that out
thanks still
humanoid:MoveTo(humanoidrootpart.Position)
I need help adding my gun animation to my Roblox game
does it overlap the last one?
wdym
if i do a new moveto does it cancel the current moveto going on to do the new one?
I need help adding my gun animation to my Roblox game dm me if you can help
Let me help
Dm me
i did it
yes
not sure u might have to test
if not then there will be ways to stop it
is humanoid stop a thing
idk
i kinda gave up after i realized my entire code didnt work properly lol
it was supposed to be a mob that chases people
but if it locks onto a player it wont chase anyone else
even if the player goes away
and i have zero ieda how to fix
yo anyone got one piece of advice on how to become a goated dev (scripter)
im also in need of that advice
cant you make pov part
wdym
or just check distance till player
can someone tell me if this is good?
?
-- SERVICES
local players = game:GetService("Players")
local replicatedStorage = game:GetService("ReplicatedStorage")
local plr = players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local Cone = replicatedStorage.ConeObject
local tool = script.Parent
--VARIABLES
local holdingCone = false
--FUNCTIONS
local function placeCone()
local coneclone = Cone:Clone()
local coneCFrame = character.HumanoidRootPart.CFrame * CFrame.new(0,-1.024,-5)
if character:FindFirstChildOfClass("Tool") then
holdingCone = true
print("holding")
end
if holdingCone == true then
local createCone = Instance.new("Part")
createCone = coneclone
createCone.CFrame = coneCFrame
createCone.Anchored = true
createCone.Massless = true
createCone.Parent = game.Workspace
print("Cone Placed")
else
holdingCone = false
end
end
tool.Activated:Connect(placeCone)
no i dont
Character becomes outdated after death - If the player dies and respawns, character still points to the old character, causing errors.
this is on a local script
then put place cone on server side
Its client
o
wait how do i fix that?
and rewrite varaible that hold character
One sec I'll send the whole script also, your code has many unnecessary lines
instead of plr.CharacterAdded:Wait() ?
oh okay
my brain is getting deepfried
--!strict
local Players: Players = game:GetService("Players");
local player = Players.LocalPlayer :: Player;
local currentCharacter = player.Character or player.CharacterAdded:Wait();
player.CharacterAdded:Connect(function(newCharacter: Model)
currentCharacter = newCharacter;
end)
and yes let me make safeguards
--!strict
local Players: Players = game:GetService("Players");
local player = Players.LocalPlayer;
if not player then return end;
local currentCharacter = player.Character or player.CharacterAdded:Wait();
player.CharacterAdded:Connect(function(newCharacter: Model)
currentCharacter = newCharacter;
end)
and place cone should be serverlogic
so it replicates to all clients
so you will have to use RemoteEvent
okay im new to scripting, when i call the remote event do i use FireServer
yes
okay
Can you explain me the idea please?
its just a simple placing cones down script, im doing it as like an assignment/task my scripter friend gave me to do
other players wont see it
try running with 2 playe instnaces
Is this all code in LocalScript?
yes
yes
that is what happens
if you want all players to see it
use tool events
use remote
sever makes the cone
on client
--!strict
local PlaceCone: RemoteEvent = game.ReplicatedStorage.PlaceCone
local Players: Players = game:GetService("Players");
local player: Player? = Players.LocalPlayer;
if not player then return end;
local tool: Tool = player.Backpack:FindFirstChild("Tool");
tool.Activated:Connect(function()
PlaceCone:FireServer();
end);
then server does valid player check and places a cone
maybe even do task.delay(lifeTimeOfCone, coneDeletionFunction)
ik
i do it cause i want to
wth
brother i made moduleScript mainly for types
--!strict
--Weak Table
export type WeakTable = {__mode: "k"};
--Log Entry
export type LogEntry = {
Time: number;
Name: string;
Action: string;
};
--Cooldown Service
export type CooldownService = {
new: new;
};
export type CooldownMetatable = {
__index: CooldownMetatable;
GetProfile: GetProfile;
};
--Cooldown
export type Cooldown = setmetatable<{
Debug: boolean;
WarningsMax: number;
WarningsReset: number;
GetDuration: GetDuration;
GetPunishment: GetPunishment;
Logs: {[number]: {LogEntry}};
Profiles: setmetatable<{[Player]: CooldownProfile}, WeakTable>;
}, CooldownMetatable>;
--Cooldown Profile Metatable
export type CooldownProfileMetatable = {
__index: CooldownProfileMetatable;
Log: Log;
Warn: Warn;
Stop: Stop;
Clear: Clear;
Start: Start;
Block: Block;
GetLog: GetLog;
Unblock: Unblock;
IsOnCooldown: IsOnCooldown;
};
--Cooldown Profile
export type CooldownProfile = setmetatable<{
Player: Player;
Blocked: boolean;
Warnings: number;
LastCall: number;
LastReset: number;
Cooldown: Cooldown;
}, CooldownProfileMetatable>;
--Cooldown Service Methods
export type new = (
arguments: {
Debug: boolean;
WarningsMax: number;
WarningsReset: number;
GetDuration: GetDuration;
GetPunishment: GetPunishment;
}
) -> (Cooldown);
--Cooldown Methods
--Shared
export type GetProfile = (
self: Cooldown,
arguments: {
Player: Player;
}
) -> (CooldownProfile);
export type Log = (
self: CooldownProfile,
arguments: {
Action: string;
}
) -> ();
export type GetLog = (
self: CooldownProfile
) -> ({LogEntry});
ty
bro can a scripter PLEASE help me with something
Server logic
-- SERVICES
local replicatedStorage = game:GetService("ReplicatedStorage");
local PlaceCone = game.ReplicatedStorage.PlaceCone;
local Cone = replicatedStorage.ConeObject;
--FUNCTIONS
local function placeCone(player: Player)
local character: Model? = player.Character;
if not character then return end;
local humanoid: Humanoid? = character:FindFirstChildOfClass("Humanoid");
if not humanoid then return end;
local coneclone = Cone:Clone();
coneclone.CFrame = humanoid.CFrame * CFrame.new(0,-1.024,-5);
coneclone.Anchored = true;
coneclone.Massless = true;
coneclone.Parent = game.Workspace;
print("Cone Placed");
end;
PlaceCone.ONServerEvent:Connect(placeCone);
sorry for bad formatting
i made an animatoin but it only plays on npcs and not on the client
i don't know why
OnServerEvent*
Did you publish it on roblox?
i did
you got an id?
is it safe to send id in here
i think nobody can use it except creators of animation i think, but not sure
oh ight
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://84246068666989"
local runTrack = animator:LoadAnimation(animation)
task.wait(5)
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
runTrack:Play()
print("mouse left pressed")
end
end)
i was just testing it, no debounces or anything
oooo
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://84246068666989"
local runTrack = animator:LoadAnimation(animation)
task.wait(5)
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
runTrack:Play()
print("mouse left pressed")
end
end)
it still isn't working
bro what i don't understand
i mean it should work
i did it in blender but it's playing on the npcs
whats the issue?
like whats the bug?
hi, new to this convo, but it's not a local script right?
uh
wym
it is
like is it working?
okay and the animation is uploaded by you?
nah it isn't wokring at all on the client
but it's playing on the server
like on the npc
add
print(runTrack.Length)
before Play() so we can see if it even loads client-side
Do you got an error message?
01:45:06.591 0.4166666567325592
it is also using a deprecated way
yo ushould be using
humanoid:LoadAnimation(animation)
nah
I believe
i think that was deprecated
animation priorty is also a thing
just tryy?
im not sure actually but i can change it from the script right
ight
yeah
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
--local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://84246068666989"
local runTrack = humanoid:LoadAnimation(animation)
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print(runTrack.Length)
runTrack:Play()
print("mouse left pressed")
end
end)
i dont think you can change it form script
track.Priority = Enum.AnimationPriority.Action
or I think animation.Priority = Enum.AnimationPriority.Action
in your case
yes
that
animation doenst have key Priority
track is never defined
01:49:59.536 Priority is not a valid member of Animation "Animation" - Client - LocalScript:12
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
--local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://84246068666989"
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print(runTrack.Length)
humanoid:LoadAnimation(animation):Play()
print("mouse left pressed")
end
end)
You can also try that above ^
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
--local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://84246068666989"
local runTrack = humanoid:LoadAnimation(animation)
animation.Priority = Enum.AnimationPriority.Action
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print(runTrack.Length)
runTrack:Play()
print("mouse left pressed")
end
end)
is it cool if i just copy and paste it?
local track = humanoid:LoadAnimation(animation)
so its runTrack not track
i thinks its better to load track once, per character
yeah
my studio might be cursed
it isn't working
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
--local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://84246068666989"
local track = humanoid:LoadAnimation(animation)
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print(track.Length)
humanoid:LoadAnimation(animation):Play()
print("mouse left pressed")
end
end)
oay
if it doesn't work try this one:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
--local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://84246068666989"
local runTrack = humanoid:LoadAnimation(animation)
runTrack.Priority = Enum.AnimationPriority.Action
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print(runTrack.Length)
runTrack:Play()
print("mouse left pressed")
end
end)
try this (should work now probably)
amm you dont i think
Yo krex
hi
you have pointer to it
How much lua experience do
You have
i dont know if that will matter
you're still technically loading the animation Id
but yea try parenting
9 years
Can I show u a project
honestly the parenting thing skipped my mind lol
It’s space themed
sigh man it aint wokring, i think it's maybe something with the addon i used to animate
but still it worked on the npc
It wont do anything
as we found before the animation is loading
okay final try from me:
Check it out 
if it doesn't work try this one:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
--local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.Parent = character
animation.AnimationId = "rbxassetid://84246068666989"
local runTrack = humanoid:LoadAnimation(animation)
runTrack.Priority = Enum.AnimationPriority.Action
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print(runTrack.Length)
runTrack:Play()
print("mouse left pressed")
end
end)
it's only playing for 0.4 seconds tho
final try ^
ight
This goes to PlayerScripts btw
not Chracter
Ask in #code-help
still not working, maybe i should try using a remoteEvent?
ight
and check each type
where
lol
print(runTrack.IsPlaying) after you runTrack:Play()
Hello I would like to ask for some advice. I want to learn much more advanced topics on Roblox, but I'm not sure where to start. I'm talking parallel luau and stuff like that, could anyone give me a list?
Luau is single threaded
check out thedevking for mostly everything that's how I learnt on yt :p
did you replace humanoid with animator
nha i have same issue i put my own animation
Icic
Okay thank you
this is the code i used
wait u have the same issue?
yes

Wait maybe animation gets garbage collected
maybe
local runTrack = animator:LoadAnimation(animation)
put it in repicated storage
is this a server script
client
i dont think u can call localplayer on a server script
im making the animation tho
instead of already having it
oh
make animation instance
instance.new
uncomment local animator line and replace humanoid: with animator:
why is the player variable highlighted red tho
cause its Player? type
strict
ight
try putting animation in replicated or staore somewhere
i remembered haveing same issue
i made animation instance and stored it
wait i dont udnerstand this
or some other things I read, animator has to exist server-side
probably garbage collector doesnt see strong reference so it collects it
copy paste ur code here
ight ill do it
wsp back electricity was gone
--!strict
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.Parent = character
animation.AnimationId = "rbxassetid://84246068666989"
local runTrack = humanoid:LoadAnimation(animation)
runTrack.Priority = Enum.AnimationPriority.Action
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print(runTrack.Length)
runTrack:Play()
print(runTrack.IsPlaying)
print("mouse left pressed")
end
end)
im gonna try and put it in replicated storage instead
?
instead of this
local animation = Instance.new("Animation")
animation.Parent = character
animation.AnimationId = "rbxassetid://84246068666989"
put a new instance somewhere
where client can get it
--!strict
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.Parent = character
animation.AnimationId = "rbxassetid://84246068666989"
local runTrack = animator:LoadAnimation(animation)
runTrack.Priority = Enum.AnimationPriority.Action
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print(runTrack.Length)
runTrack:Play()
print(runTrack.IsPlaying)
print("mouse left pressed")
end
end)
just copy paste try that before replicated :p
Server Script @autumn hull
local Players: Players = game:GetService("Players")
local replicatedStorage = game:GetService("ReplicatedStorage")
local Cone = replicatedStorage:WaitForChild("ConeObject")
local serverClone = replicatedStorage:WaitForChild("Remotes"):WaitForChild("PlaceClone")
--VARIABLES
local holdingCone = false
--FUNCTIONS
local function placeCone(plr: Player)
if not plr then return end
local character = plr.Character
if not character then return end
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if not humanoidRootPart then return end
local coneclone = Cone:Clone()
local coneCFrame = humanoidRootPart.CFrame * CFrame.new(0, -1.024, -5)
if character:FindFirstChildOfClass("Tool") then
holdingCone = true
print("holding")
else
holdingCone = false
end
if holdingCone == true then
local createCone = coneclone
createCone.CFrame = coneCFrame
createCone.Anchored = true
createCone.Massless = true
createCone.Parent = workspace
print("Cone Placed")
end
end
serverClone.OnServerEvent:Connect(placeCone)
Local Script
local replicatedStorage = game:GetService("ReplicatedStorage")
local tool = script.Parent
local placeClone = replicatedStorage:WaitForChild("Remotes"):WaitForChild("PlaceClone")
tool.Activated:Connect(function()
placeClone:FireServer()
end)
something like that
i did
it it aint working
i think maybe
soo weird
there's something wrong with blender
what's going on
nah i have same thing with roblox animation
ohhhh
animations have always been buggy to me lol
what should the code look like instead of this
last try is create the Animation object yourself and put it in replicatedstorage
like delay right
i think it has to exist server side even if you're calling it client side
i have it in rep
yeah im doing it rn
okay so just replace the 3 animator lines with local animation = game:GetService("ReplicatedStorage"):WaitForChild("Animation")
if that doesn't work... no clue
no I've had it in the past where they just wouldn't load
--!strict
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
game:GetService("ReplicatedStorage"):WaitForChild("Animation")
local runTrack = animator:LoadAnimation(animation)
runTrack.Priority = Enum.AnimationPriority.Action
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print(runTrack.Length)
runTrack:Play()
print(runTrack.IsPlaying)
print("mouse left pressed")
end
end)
like that?
but it was like, 4 years ago
no...

--!strict
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animation = game:GetService("ReplicatedStorage"):WaitForChild("Animation")
local runTrack = animator:LoadAnimation(animation)
runTrack.Priority = Enum.AnimationPriority.Action
print("wait is over")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print(runTrack.Length)
runTrack:Play()
print(runTrack.IsPlaying)
print("mouse left pressed")
end
end)
that
oh wait i forgot local
so both animator and animation exist server-side
yea
i've been trying to debug this from today my brain is fried
ur just calling it client side
server is not a problem
problem is that everything exist but animation doesnt play
we still check and cover all bases
runTrack.Ended:Connect(function()
print("Banana");
end);
put this at the end?
try
is it an error?
does it print banana after x amount of seconds?
when you click play and click is it prints?
dont mind server code
yeah
oh it never ends
r6
i changed the avatar settings to r6 too
yeah
there is also... Animator.AnimationPlayed
oh wait
to check if it plays
the aavatar settings wasn't changed to r6....
because right now banana never prints right so it never ended
i just did
bruh
dude
ahahha
it isn't working either wthhh
hopefully it wors now
does it print banana?
best error message
is your game avatar settings even in r6? (top 3 dots ... at the top R6 only?)
wait wym
so it "plays" but never ends = it starts but immediately stops
welcome to roblox where we hide everything for no reason and deprecate everything
does it work now 😭
your character was never r6... if so
r6 anim cant play on r15 because roblox sets to r15 automatically
yeahhh it's working now
there is fake r15 where its r6 anims but still r15 and its stupid
yayy
we did ittt
bro
real...
not a lot of people do...
because i already set it to r6 here
dang
@hasty shore does it work?
like you should put some cooldown on the remote tho
and delete cones after x amount of time
yeah
delete the .Ended print(banana) thing
delete all prints
as we know it works
prints are for debug, also remove the strict line at the top
What
ye it works
WE are the optimization goats twin 🥹✌️
@twin flare
?
DMs?
Would yall make a collectionscript if u r gon use the same 1 line code like 8 times or would yall just put the code in each one of the 8 parts
just use a folder
and 1 script
anyone here need a game template
i need help i got custom finger rig but how do i put it on my character in the actual game
r15 boy rig
when i put it in starterplayer as startercharacter it doesnt get the humanoid descs
who can help me in scripting Pls Guys For Free
i need 67 billion robuzz
doesn't really matter for just 8 scripts
but collectionservice can help if you end up wanting to change something so you only have to fix one script
Pay $6-7 first
Hello guys am looking for someone to help me out with Ui my game is mostly done just needs some Ui dm if you can help me
no payment btw
best way to begin lua ?
can someone tell me why roblox ai assistent is suddenly telling me he's unable to edit my scripts
yo yo yo
can anyone help me fix animations not loading in game ( i bought the game a year ago and i dont have permission to the animations, is there any way around this I can pay a good ammount of usd, robux)
Oh i see thanks a lot!
Would yall say making abilities is hard
depends how good you are at scripting
who ping me
Oh aight ig i will try to improve a bit more thanks
it got new upd ig it happend with me also
Dont use it
hello how can i make this a loop ? cuz when the game is finished its not starting a new one
I hate meshes
Hi i see you using relational operators in ur code do yk a good video explaining it thx
ah
why dont you ask AI for how you can get past that problem
whats relational operators ? 😭
My fault == <= >=
u dont understand this ?
i can explain it to u its easy come dm
Tysm
dm me ill show u
because the while task.wait() inside gameStarted == true with no condition, its infinite
add
elseif gameStarted == true then
while gameStarted do
task.wait(0.1)
yes tysm but sm1 already told me how to do it ;3
looks fine so im not sure, can you do some print debugging, add prints under the first few lines
of the main loop
Sent pm
i did but u gotta add me in friend first
accept my request
Ok
on a serious note, what should i use AI for and what shouldn't I? I'm not fully against it but I also really enjoy scripting myself, so idk what tasks I should automate and which ones would be better to do / funner to do myself
the rule of thumb is that "ai should assist, not replace you"
speaking purely on programming, you can definitely use it, especially for pieces of code u dont understand or pieces of code that you think should work but arent and etc
yeeeep, so lowkey highkey, AI is my last resort
first is searching on devforum
well it depends actually
if its a small enough problem, AI is easiest to ask
but devforum has a wider scope and will most likely be the most accurate
AI can hallucinate, so keep that in mind :3
atleast from my free ai usage, they suck at coding in things revolving around CFrames
or anything indepth related to math
Is it worth to use modules to handle gui?, i think i just got an issue in my LobbyUI system wich after the players dies and it runs the module.new() again ,its just stop working
why r u using a module?
r u using the functions for multiple UIs?
Yes im using multiple modules to handle diff parts of the uis-
Lobby and round for example
oh, r u using oop?
what exactly does ur module do
for the ui
Creates slots, for characters and other stuff
I think i figured out the mistake was i was destroying the slottemplate after cloning them and then in the next loop i didnt had any
so i assume .new() makes a new slot?

function CharacterSelectionMenu.new(lobbyGui)
local self = setmetatable({}, CharacterSelectionMenu)
self.Menu = lobbyGui:WaitForChild("CharactersMenu")
self.Menu.Visible = false
local layout = self.Menu:WaitForChild("CharactersLayout")
self.KillersTemplates = layout:WaitForChild("Killers")
self.SurvivorsTemplates = layout:WaitForChild("Survivors")
self.CharView = self.Menu:WaitForChild("CharView")
self.CharacterInfo = self.CharView.CharacterInfo
self.CharacterName = self.CharacterInfo.TextLabel
local actorsFolder = game.ReplicatedStorage.Gui.Actors
self.killersFolder = actorsFolder:WaitForChild("Killers")
self.survivorsFolder = actorsFolder:WaitForChild("Survivors")
self.viewportRigs = { Survivor = nil, Killer = nil }
self.selectedSlots = { Survivor = nil, Killer = nil }
self.currentView = "Survivor"
local OpenCharsMenuBtn = lobbyGui:WaitForChild("OpenCharsMenu")
OpenCharsMenuBtn.MouseButton1Click:Connect(function()
self.Menu.Visible = not self.Menu.Visible
end)
local ShowKillersBtn = self.Menu:WaitForChild("ShowKillers")
local ShowSurvivorsBtn = self.Menu:WaitForChild("ShowSurvivors")
self.KillersTemplates.Visible = false
self.SurvivorsTemplates.Visible = true
ShowKillersBtn.MouseButton1Click:Connect(function()
if self.currentView == "Killer" then return end
self.KillersTemplates.Visible = true
self.SurvivorsTemplates.Visible = false
self.currentView = "Killer"
self:RefreshCharView()
end)
ShowSurvivorsBtn.MouseButton1Click:Connect(function()
if self.currentView == "Survivor" then return end
self.KillersTemplates.Visible = false
self.SurvivorsTemplates.Visible = true
self.currentView = "Survivor"
self:RefreshCharView()
end)
return self
end
add prints to both ur module.new() function (in ur module) and where u reference it (in ur script)
see what doesnt print when u die
hey
rule of thumb for debugging, if u dont know whats going on, you can try checking if something isnt running when its supposed to be
so add prints
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "HealthDisplay"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui
local container = Instance.new("Frame")
container.Name = "HealthContainer"
container.Size = UDim2.new(0, 100, 0, 100)
container.Position = UDim2.new(1, -120, 1, -120)
container.BackgroundTransparency = 1
container.Rotation = 15
container.Parent = screenGui
local healthIcon = Instance.new("ImageLabel")
healthIcon.Name = "HealthIcon"
healthIcon.Size = UDim2.new(0, 80, 0, 80)
healthIcon.Position = UDim2.new(0.5, -40, 0.5, -40)
healthIcon.BackgroundTransparency = 1
healthIcon.Image = "rbxassetid://75818338384399"
healthIcon.ScaleType = Enum.ScaleType.Fit
healthIcon.Parent = container
local bounceTween
local function createBounce()
local bounceInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, -1, true, 0)
local bounceGoal = {Position = UDim2.new(1, -120, 1, -130)}
bounceTween = TweenService:Create(container, bounceInfo, bounceGoal)
bounceTween:Play()
end
local function fallOffScreen()
if bounceTween then
bounceTween:Cancel()
end
healthIcon.Image = "rbxassetid://71328443351937"
local fallInfo = TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 0, false, 0)
local fallGoal = {
Position = UDim2.new(1, -120, 2, 0),
Rotation = container.Rotation + 180
}
local fallTween = TweenService:Create(container, fallInfo, fallGoal)
fallTween:Play()
fallTween.Completed:Connect(function()
healthIcon:Destroy()
end)
end
local function respawnIcon()
healthIcon = Instance.new("ImageLabel")
healthIcon.Name = "HealthIcon"
healthIcon.Size = UDim2.new(0, 80, 0, 80)
healthIcon.Position = UDim2.new(0.5, -40, 0.5, -40)
healthIcon.BackgroundTransparency = 1
healthIcon.Image = "rbxassetid://75818338384399"
healthIcon.ScaleType = Enum.ScaleType.Fit
healthIcon.Parent = container
container.Position = UDim2.new(1, -120, 1, -120)
container.Rotation = 15
createBounce()
end
local function onCharacterAdded(character)
local humanoid = character:WaitForChild("Humanoid")
humanoid.MaxHealth = 100
humanoid.Health = 100
humanoid.Died:Connect(function()
fallOffScreen()
end)
end
createBounce()
if player.Character then
onCharacterAdded(player.Character)
end
player.CharacterAdded:Connect(function(character)
wait(0.5)
respawnIcon()
onCharacterAdded(character)
end)
how would i go about adding extra lives??
im not asking for spoonfed code, but what all would i need in order to add extra lives to the player & have them dissapear according to health?
Yup
i want the player to be able to do tasks to gain 1 extra life (potentially more if given rare circumstances) and i want the lives to fall off once the player reaches a certain threshold
but idek how to go about it & im a bit stumped on what id need
i know i need a remoteevent to tell the server to give the player 100 health & (obviously) the ui script provided
I am not rly good but ig u could just make an intvalue and make it a child of the player
Your code is AI generated?
nah, my friend helped a bit
i just made the ui within the script because its just an easy setup
and i thought it would be easier to modify
its what my codev said
For your question I don't quite understand what you mean with "Extra Lives" , but probably you can customize the max health of the humanoid
like uhhh
the player starts off with 1 life
and they are 1 shot
(100 health)
because the killer does 100 damage
but if they have 2 lives, which is obtainbable by doing tasks during the round, they get 200 health
but once they fall back to <=100 health, the newly obtained life falls off the display, leaving the player with only 1
You assign a new value for the players humanoid and then you calculate damage by getting players max humanoid
do you need a serverscript for that? cuz i tried it and it was treating the player as if i only had 100 healthg
It is just a customizing of max health
If you calculate the damage of the shot you need to get players maxhealth
Not a constant value like 100
ohh so you need relative damage
so wait
i need to track lives on the server (use an intvalue/numbervalue in the player) to prevent exploits & initialize with 1 life
and scale the health by setting Humanoid.MaxHealth = lives x 100
and then use remoteevents for ui updates?
i think u can just handle the ui updates on client
u can see ur health going down anyhow, no need for the server to tell the client about their health
should i use a RemoteEvent or .Changed connection to detect when the lives value changes?
humanoid.GetPropertyChangedSignal("Health"):Connect()
i dont know why my triple hatch and auto hatch scripts arent working if any1 can take a look in dms lmk
After the shots hit the target you use FireServer
its only visuals tho
And then calculate stuffs on server and then fire client if needed
am i misunderstanding what theyre asking for
He needs to substract the extra lives value and also setting the health value tho
oh i mean yeah sure, i was talking specifically about
the ui updates
Which UI Updates
so if im not mistaken, it should work as such?
- player does task > client fires remote event to server
- server verifies task completion > adds +1 to lives intvalue > sets humanoid.maxhealth = lives * 100
- client's getpropertychangedsignal("health") or getpropertychangedsignal("maxhealth") detects the change
- client adds another health icon to the ui
- killer hits player > damage is dealt on server
- client's humanoid.health drops (e.g., from 200 to 100)
- client's getpropertychangedsignal("health") detects health crossed threshold
- client calculates current lives = math.ceil(humanoid.health / 100)
- if current lives < displayed lives, client triggers fall-off animation for one icon
- icon falls off screen, player continues with remaining lives
- if health hits 0, humanoid dies and player respawns with 1 life again
NEEED SOME HELP! plz!
chat
yall know the like sab steal system right? like the "steal" prompt and wtv wtv
should i use welds to weld the like, npc to the player when it's stealing it?
"and then use remoteevents for ui updates?"
i assume they mean like
updating the health gui to visualize how many lives the player still has
yes
exactly
thats impressively on point, good job
Client getpropertychanged Signal fires only after the health got changed so if you shot the damage still need to cacualze correctly tho idk if I have explained well idk
okay im curious tho
sweeeet! thanks a ton guys
how do u intend to handle step 11
Yeah I would like doing after the shot hit the target and then fire client using existing extra lives stored on server
Np
yeah? whats ur point
humanoid.died event fires on server > server sets lives intvalue back to 1 > server sets maxhealth back to 100 > player respawns
oh sure
someone..? 🥹
Or wait I think that works anyway.
just move the npc smoothly with code, welding can break animations and feels clunky
server script: it wouldn't move smoothly unfortunately
tried using runservice for both client and server and it did not end up well
yeah exactly, welding locks the npc instantly which won’t interpolate nicely
best approach is a server loop or tween to move it toward the player while stealing
but it would do like a RLLY bad lagback
RunService loops on the client can’t reliably control server objects, and server loops don’t replicate smoothly to clients
exactly, so idk what to do
weld works fine
set the npc’s networkowner to the player and lerp it on the client & server only checks occasionally to prevent desync
but it anchors the character for some reason, any reason for that?
oh damn wait yea
oh, actually just use a weld constraint
well yeah thats what i meant 😭 i meant weldconstraint
but the character's anchored
welding itself doesn’t anchor anything, but if you weld the npc to the player’s rootpart or humanoid root, and that root is unanchored, roblox physics can freak out
cause here's what happens: when it welds, i legit can't move myself, like the NPC is on t op of me but i literally can't move or jump or anything
uhh so i assume none of them are anchored
but as soon as u weld
suddenly the character cant move?
sometimes the engine treats the weld as a static connection and makes the npc act like it’s anchored
- also if either part is accidentally anchored, the weld will propagate that effect
yeah when i weld the humanoidrootpart of the NPC to the player's humanoidrootpart it just, yk, cant move
so i js have to unanchor the HRP?
of the NPC?
to test, try making the npc's parts cancollide = false
unanchor the npc’s hrp and the player’s hrp before welding
see if its a physics problem from the npc
if either is anchored, the weld can make the other act static too
i'll try that, if it doesn't work i'll prob set the network ownership to the player
ill let yall know if it works
unanchoring usually fixes it, but if it still feels sticky, giving the player network ownership will make the movement smooth and rid of the problem of robloxes janky ass physics
lowkey try everything
u never know with roblox physics LOL
it could either be a mass problem, network ownership problem, anchor problem
etc
yea
mkay yeah it was the anchor problem
now the problem is, character moves janky
idk how to explain it tbf it moves rlly janky
welding a moving humanoid feels janky, try motor6d or lerp npc manually and disable collisions with player while stealing
disable collisions of the npc
if it makes the jank go away, its a mass problem, u can then go customphysicalproperty and set density to the lowest value on all the npcs parts
i think it was 0.1?
yep, set all npc parts density to 0.1 friction 0 elasticity 0, makes them light and smooth without anchoring
i have to do allat? 😔
btw just to get this clear, yk the "fly" command in HD admin, like when you turn it kinda turns slowly to where you're looking? that's what the character's doing
basically yeah
every part that contributes to mass
if you skip some, physics will still fight itself and make it janky
didn't work..?
i wanna learn luau
then it’s probably torque/rigidbody fighting itself
lowering density helps, but if the npc has motors or constraints, they’ll still cause the janky stuff
either set NetworkOwnership to the player or disable some constraints while moving
i'll js set networkownership to the player 🙏
probably the best and easiest approach
oh
theres a rigid body in the mix?
that i did not know
i was just assuming, its a common problem w stuff like this
its like, 99% likely that its just going to be some sort of modification with the rigid body
okay no i have to be tripping
can someone teach me luau
js to be clear, this is how to do it right?
for _, v in NPC:GetDescendants() do
if v:IsA("BasePart") or v:IsA("MeshPart") then
v:SetNetworkOwnership(plrWhoTriggered)
end
end
like im not tripping
if u want the easiest approach, go to youtube, if u want the more accurate approach, go to the roblox documentation
whatevr
whys nothing working 💔
yep
it aint working 😭
whats happening?
i have no clue
collisions between npc parts causing wobble
humanoid trying to auto-correct cframe/velocity
joints or motors fighting each other
too heavy parts even with low density
physics stepping issues if server laggy
^ this is what my hb said
those are probably your issues
basically anything that adds opposing forces can make it do that
is it r6 or r15?
r15
make sure you do it to EVERY body part
dm me ur script(s)
this server doesnt like .txts
how does teleport service when you ask to teleport to a certain position
or a part even
hrp.CFrame = CFrame.new(Vector3.new(x, y, z)) -- teleport to position
hrp.CFrame = part.CFrame + Vector3.new(0, part.Size.Y/2 + hrp.Size.Y/2, 0) -- teleport on top of part
make sure the hrp isn’t anchored.
hrp is humanoidrootpart?
yuh
alrighty
is ther eany ways
to make it so it's a part
instead of a position vector3 thingy
you can just pass a part instead of a vector3, and use its CFrame for teleporting
basically the player moves to the part’s position instead of raw coordinates
local targetPart = workspace.PARTNAMEHERE
hrp.CFrame = targetPart.CFrame + Vector3.new(0, targetPart.Size.Y/2 + hrp.Size.Y/2, 0) -- stand on top
okej
streaming enabled
does this require teleport service?
teleport service is for teleporting things to other games
teleporting players that is
oooo
thanks
and
look I was like editing a script of a teleporter that was teleporting people to another place, how do I make it so they get teleported to the cframe I want here
local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local LeaveGuiEvent = ReplicatedStorage:WaitForChild("LeaveGuiEvent")
local TransitionEvent = ReplicatedStorage:WaitForChild("TransitionEvent")
local WaitingPlayers = {}
local playersin = 0
local timer
local teleporting = false
local spawnTeleport = script.Parent.Spawn
local function updateGui()
if playersin == 1 then
script.Parent.BillboardPart.BillboardGui.TextLabel.Text = "Waiting for a duo..."
elseif playersin == 2 then
script.Parent.BillboardPart.BillboardGui.TextLabel.Text = "Teleporting..."
elseif playersin == 0 then
script.Parent.BillboardPart.BillboardGui.TextLabel.Text = ""
end
end
local function removeFromList(character)
for i=1, #WaitingPlayers do
if WaitingPlayers[i] == character.Name then
table.remove(WaitingPlayers, i)
updateGui()
end
end
end
local function teleportPlayers(player)
if #WaitingPlayers == 2 then
script.Parent.BillboardPart.BillboardGui.TextLabel.Text = "Teleporting..."
end
local playersToTeleport = {}
local teleportTime = 0
for i=1, #WaitingPlayers do
if game.Players:FindFirstChild(WaitingPlayers[i]) then
table.insert(playersToTeleport, game.Players:FindFirstChild(WaitingPlayers[i]))
TransitionEvent:FireClient(game.Players:FindFirstChild(WaitingPlayers[i]))
else
table.remove(WaitingPlayers, i)
end
end
local code =
end```
pass teleport data
local code was = to sum like
then on the landing server you read the teleport data
"TeleportService:ReserveServer(placeid)"
and reposition the cahracter
so I just put what he said above
targetPart = workspace.PARTNAMEHERE
hrp.CFrame = targetPart.CFrame + Vector3.new(0, targetPart.Size.Y/2 + hrp.Size.Y/2, 0) -- stand on top
ah alright
usually the term teleporting refers to sending a player to another server/game
cuz teleportservce does that
ooo
in your case just do this
tpservice is for other games
what is ":FireClient" utility
thats callefd a method, not a utility
things are like objects, and they have methods or functions that enable them to do things, or procedures
what each object has for its methods/functions are determined by what class they are
or "type" in that regard
get to the point twin
well i was actually giving you the most important fundamental piece of information to know how to code whatsoever
letting you learn and understand it entirely on your own
but now you can screw off
😭
its pretty self explanatory lmao
turns out I'm not english and to me fire means 4 other words in my language
I feel burn out I am not seeing results despite putting so much effort and now I’ve hit a wall with Ui in Figma I design Ui looks good high quilty and in Roblox it’s low quilty for pc players only (higher resolution) mobile looks ok am tired am just gonna finsih the game release it then Quit
Fire in that context means to shoot
your english seems pretty fluent, what language do you speak originally?
FireClient means shoot at the client
french mixed with a bit of russian and a bit of dutch
💀
in a way it deletes the instance
so basically ping
yh
wtf is the relation between ping and shoot...
u have to give it a player arg tho
its like
shooting a projectile at it
but the projectile
are the args
ooo
it doesnt really make sense lol
so basically if I
remoteevent:FireClient(arg) it sends to the remote event what the client knows about the arg?
insane tag
snus is life
what mg
50
you would go re:FireClient(player, arg1, arg2, arg3)
then on the client script
re.OnClientEvent:Connect(function)
is toolbox a good way to get sources to copy scripts afterwards?
short answer: not really
what is a good source then
you can use the devforum
50-60% of the time what you're looking for has already been solved
What should come after learning inheritance and composition
nah like throwing a ball with information over the wall to the player
thats all you really need no? just learn to make systems you need for various games, pathfinding algos, enemy ai, etc
make stuff
Should i focus on making reusable systems
no just make stuff
hard to know how to code if you dont get some problem solving under ur belt, reusable or not
fira
yea
its not rlly an objective decision though
just google the most common and try em out
isn't that the default 😭
i guess? i just like fira/fira sans
oka
how can i upload a font?
from like google or smth
to.. studio?
i use consolas
im making a powder simulator
how do i check surrounding tiles?
rn this is how my table is setup
replace x with (x-1) for left, (x+1) for right, and so on
if grid[...] is nil you know the neighbor doesnt exist
use 2d table
already got working but thanks
u need to make a 2d array
like its not even a "itd be nice" ur actually skipping a pretty important concept when learning how to code
what
🙏
what is a 2d array
U need to learn how to use 2d arrays yeah
https://www.youtube.com/watch?v=Vh4krbTnTAA this is in C but he explains it, u can also just google it
C 2D arrays multidimensional arrays tutorial example explained
#C #2D #arrays
its an array that goes in two dimensions
but they look the same
listen and learn before speaking
not even to me just like actually maybe watch the video and research what two people have told you
also searching 2d arrays in google has not shown me anything
ermm actually 2d table is 0.001ms slower on read than a 1d table
yes yes hashing is-- zzzzz....
💤
i mean like
i cant find anything
nvm
google ai to the rescue
even if you dont use it you need to learn abt this its like one of the things™ you learn when beginning to code
it opens up many many things
so gl
telling 
yea uh
i followed like 2 tutorial series
and i started learning 9 months ago
yet i've never heard of ts
😭
im cooking myself
it is just the downfalls of being self-taught, i understand as im self-taught as well
ig ill learn about it after im done prototype
guys who i can fix this
`local function loadAnimations()
if not character then return end
local humanoid = character:FindFirstChild("Humanoid")
if not humanoid then return end
local serverStorage = game:GetService("ServerStorage")
local rig = serverStorage:FindFirstChild("Rig")
if not rig then
warn("Rig not found in ServerStorage!")
return
end
local getGunAnim = "rbxassetid://98217059222183"
local shootAnim = "rbxassetid://119881662883413"
if getGunAnim and getGunAnim:IsA("Animation") then
getGunTrack = humanoid:LoadAnimation(getGunAnim)
print("Get Gun animation loaded!")
else
warn("Get Gun animation not found or not an Animation object!")
end
if shootAnim and shootAnim:IsA("Animation") then
shootTrack = humanoid:LoadAnimation(shootAnim)
print("Shoot animation loaded!")
else
warn("Shoot animation not found or not an Animation object!")
end
end`
is there
a person with PC, internet access and a web browser?
and like, 5 spare minutes
Raw text
```lua
print('Hello World')
```
Formatted
print('Hello World')
bruh tell us the bug
fr
i need to playtest a web game im making
specifically the dedicated server
animation not working
u need 3 braincells, a keyboard and shit i said previoisly
3 braincells to type an IP without mistakes
where is character located? it is not a parameter
lmao that and also getGumAnim is an ID and not an animation
idk
what
wym idk
this not working
you can talk me in DM for show you my screen
local getGunAnim = "rbxassetid://98217059222183" --- NOT AN ANIMATION, ITS AN ID
local shootAnim = "rbxassetid://119881662883413" --- NOT AN ANIMATION EITHER
if getGunAnim and getGunAnim:IsA("Animation") then
getGunTrack = humanoid:LoadAnimation(getGunAnim)
print("Get Gun animation loaded!")
else
warn("Get Gun animation not found or not an Animation object!")
end
since its an ID
your :IsA marks it as false
so it doesnt run
and it wouldnt run either way
such a random check anyway
why do you need to check if your animation is an animation lol
assuming you did it right
who i can fix bro
just make a new instance of an animation and set the id to your getGunAnim
then use THAT when loading the animation
ok
man no offense but i feel like you should go do a quick refresh of the basics of the studio before moving forward
IsA wouldnt even run
theres nothin to run lmao
I am not the one who made it, i just put the comments
i know im just aiding your teaching
it wont mark it as false, it wont even run, IsA isnt a member of a string
itll give a full syntax error
ah yea true
this work ?
you didnt change anything
no
he copied and pasted the stuff i send 🥀
the tldr is that is text, aka a string, its literally just the letters "rbxassetid://98217059222183" in order as far as the computer is concerned
as such you need an actual animation object
what i suggest is to create one by inserting one with the little + icon under the script and then put the ID in it
under its properties
@brisk fjord bro i have script have 1800line How i can Fix animation
pls guys
help me give me step
yeah im tapping out
i can help non-native speakers but desperate ones are pushing it for me, and not even speaking derogatorily
man i dont wanna be that dude but this feels like rage bait
iknow thanks
no pls bro ihave just 14 yours old pls help me bro
local getGunAnimId = "rbxassetid://98217059222183" --- NOT AN ANIMATION, ITS AN ID
local shootAnimId = "rbxassetid://119881662883413" --- NOT AN ANIMATION EITHER
local getGunAnim = Instance.new("Animation", script)
getGunAnim.AnimationId = getGunAnimId
local shootAnim = Instance.new("Animation", script)
shootAnim.AnimationId = shootAnimId
why did you get rid of the loading part
Ah dude i really want to help you but you need the basics
what i Pro bro
yea this defo rage bait
dont use the second parameter of instance.new()
local function loadAnimations()
if not character then return end
local humanoid = character:FindFirstChild("Humanoid")
if not humanoid then return end
local serverStorage = game:GetService("ServerStorage")
local rig = serverStorage:FindFirstChild("Rig")
if not rig then
warn("Rig not found in ServerStorage!")
return
end
local getGunAnimId = "rbxassetid://98217059222183" --- NOT AN ANIMATION, ITS AN ID
local shootAnimId = "rbxassetid://119881662883413" --- NOT AN ANIMATION EITHER
local getGunAnim = Instance.new("Animation", script)
getGunAnim.AnimationId = getGunAnimId
local shootAnim = Instance.new("Animation", script)
shootAnim.AnimationId = shootAnimId
if getGunAnim and getGunAnim:IsA("Animation") then
getGunTrack = humanoid:LoadAnimation(getGunAnim)
print("Get Gun animation loaded!")
else
warn("Get Gun animation not found or not an Animation object!")
end
if shootAnim and shootAnim:IsA("Animation") then
shootTrack = humanoid:LoadAnimation(shootAnim)
print("Shoot animation loaded!")
else
warn("Shoot animation not found or not an Animation object!")
end
end
why? it just parents it to the script
also wait a minute
this is in a local script
and youre accessing server storage
thats not possible
this work bro
or it is ig
deprecated
☹️
☹️
can you give me rate for game 10/?
you dont even use the thing you access serverstorage for 💔
local function loadAnimations()
if not character then return end
local humanoid = character:FindFirstChild("Humanoid")
if not humanoid then return end
local getGunAnimId = "rbxassetid://98217059222183" --- NOT AN ANIMATION, ITS AN ID
local shootAnimId = "rbxassetid://119881662883413" --- NOT AN ANIMATION EITHER
local getGunAnim = Instance.new("Animation", script)
getGunAnim.AnimationId = getGunAnimId
local shootAnim = Instance.new("Animation", script)
shootAnim.AnimationId = shootAnimId
if getGunAnim and getGunAnim:IsA("Animation") then
getGunTrack = humanoid:LoadAnimation(getGunAnim)
print("Get Gun animation loaded!")
else
warn("Get Gun animation not found or not an Animation object!")
end
if shootAnim and shootAnim:IsA("Animation") then
shootTrack = humanoid:LoadAnimation(shootAnim)
print("Shoot animation loaded!")
else
warn("Shoot animation not found or not an Animation object!")
end
end
wait i will test
🤯
guys
is it fine if i put a local script + server script + a remote event inside a tool
23:09:13.488 Get Gun animation loaded! - Client - 2/2:218 23:09:13.489 Shoot animation loaded! - Client - 2/2:225 23:09:13.930 Failed to load animation with sanitized ID rbxassetid://119881662883413: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id=119881662883413&serverplaceid=0 - Studio 23:09:13.930 Failed to load animation with sanitized ID rbxassetid://98217059222183: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id=98217059222183&serverplaceid=0 - Studio 23:09:13.935 The experience doesn't have access permission to use asset id 119881662883413. Click to share access - Studio 23:09:13.936 The experience doesn't have access permission to use asset id 98217059222183. Click to share access - Studio 23:09:18.439 Infinite yield possible on 'Players.AY_PRO28.PlayerGui:WaitForChild("Shop")' - Studio 23:09:18.441 Stack Begin - Studio 23:09:18.442 Script 'Players.AY_PRO28.PlayerGui.AxeComm2.BottomButton.HUDBg.Styles.styles', Line 5 - Studio - styles:5 23:09:18.442 Stack End - Studio 23:09:48.875 Failed to load animation with sanitized ID rbxassetid://98217059222183: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id=98217059222183&serverplaceid=0 - Studio 23:09:48.878 The experience doesn't have access permission to use asset id 98217059222183. Click to share access - Studio 23:09:50.442 Failed to load animation with sanitized ID rbxassetid://119881662883413: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id=119881662883413&serverplaceid=0 - Studio 23:09:50.445 The experience doesn't have access permission to use asset id 119881662883413. Click to share access - Studio
whaaaaaaaat idh access for animation
Guys Thanks is work now
@regal salmon @brisk fjord Thanks
👍
im Good scripter ?
yes or no?
yeah thats fine
ok
Hi guys, I have a question for you all. When importing UI's from Figma, how do I make sure the sizes scale proportionally in studio?
#interface this is a UI question not related to code
are you familiar with the scale values in a gui object's position / size properties?
i could explain but tbh it's all documented and widely talked about on the devforum as well ^^ for a heads up
Oh sorry, and @bronze path I have Anchor at .5,.5 and the position set
can I private DM you?
dw just letting you know next time you have a question related to this field 👍🏽 😁
ok ty
What this means ? 01:58:29.544 Script Context.CoreScripts/CharacterNameHandler:105: attempt to index nil with 'names' - Studio
Its nothing with my scripts i think its smth to do with the player vanila local scripts idk
it appears when a new player joins the server
yh its corescript
roblox end error u cant do anything
jus ignore it
Alright
anyone free to help me test something?
bet
here's the place https://www.roblox.com/games/94427262758492/A-Soccer-Game
A STREET SOCCER GAME
[GAME IS BRAND NEW EXPECT BUGS]
Fast 4v4 matches where every touch matters smooth dribbles, clean shots, satisfying tackles, and clutch saves.
PC CONTROLS:
Shift = Sprint
Ctrl = Shift Lock
Hold Left Click = Shoot / Pass (aim with mouse)
Q = Dribble / Skill
E = Tackle / Slide
Hold F = Power Shot (charge)
Space = Jump / H...
let me know when you join
Is there a rly good inventory module?