local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(chat)
if chat == "/UnleashHellUponThine" then
print(chat)
local Ball = RS.ball:Clone()
Ball.Parent = game.Workspace
end
end)
end)
I tried your script, and the ball tool (I assume it’s a tool) does get copied. However, in your script, you say the ball’s parent is “Workspace”, not the player’s backpack.
Studio does copy the “ball” tool, and then move it to the workspace.
To have the “ball” tool in a player’s backpack, try changing
Ball.Parent = game.Workspace
to
Ball.Parent = plr.Backpack
The full script would be
local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(chat)
if chat == "/UnleashHellUponThine" then
print(chat)
local Ball = RS.ball:Clone()
Ball.Parent = plr.Backpack
end
end)
end)
Ah, okay, my bad. Did not understood.
So, your script is working fine for me. I tried with a anchored part named “ball”, and it does have copied onto the workspace, and showed.
The script you provided is working perfectly on my side.
Here’s the script in case of :
local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(chat)
if chat == "/UnleashHellUponThine" then
print(chat)
local Ball = RS.ball:Clone()
Ball.Parent = game.Workspace
end
end)
end)
Have you checked in the workspace if the part does not show there?
When it copies the part, it’s automatically placed where it was before you moved it to ReplicatedStorage.
Weird. Does it shows an error or something in the console?
Try adding a print after the :Clone() line and the Ball.Parent = game.Workspace and see if it prints or not.
i tried that, and it prints. by chance do you think i should move the ball to the player? because it may be getting spawned outside of the render distance.
You’re using the new chat, and Player.Chatted does not work with it. Either switch to the legacy chat or search for a chat detector that works on the new chat
if you’re trying to switch to the legacy chat, where player.chatted works, click TextChatService in explorer, go to properties and find the dropdown, switch it to legacy chat.
wait o, because the function is working. the event is firing. the print works fine, the rest does not. if the signal didnt trigger then how is it printing?
yeah i knew it, new cht works fine with player.chatted. i made the part move to the player and now it works fine.
Just remember; new chat works fine with player.chatted!