So I made a tool that whenever you click It, a script forces a player to say a random phrase however It appears that Its not appearing whenever the tool Is clicked, this Is the script:
local tool = script.Parent local phrases = { "Test!" } tool.Activated:Connect(function() game:GetService("Chat"):Chat(script.Parent.Parent.Parent.Head, phrases[math.random(1, #phrases)], Enum.ChatColor.White) end)
I think you meant
local tool = script.Parent local phrases = { "Test!" } tool.Activated:Connect(function() game:GetService("Chat"):Chat(script.Parent.Parent.Head, phrases[math.random(1, #phrases)], Enum.ChatColor.White) end)
Since if you put a extra .Parent
, you would reference the Workspace.
or if it is a local script, try
local tool = script.Parent local phrases = { "Test!" } tool.Activated:Connect(function() game:GetService("Chat"):Chat(game.Players.LocalPlayer.Character.Head, phrases[math.random(1, #phrases)], Enum.ChatColor.White) end)