Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Where exactly should I put the chatservice?

I have a Hopperbin based tool and it summons a certain model for a short amount of time and I want to put ChatService somewhere so it summons the model with ChatService. Heres the script: bin = script.Parent

function onButton1Down(mouse)

local model = bin.Monster:clone() 

model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.hit.p)


wait(5)
game.workspace.Monster:Remove()

end

function onSelected(mouse) mouse.Icon = "rbxasset://textures\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end

bin.Selected:connect(onSelected)

Heres the ChatService: game:GetService("Chat"):Chat(me.Character.Head, "Cross-Fire!", "Green")

1 answer

Did you specify "me"
This script makes a chat each time you press the left button of your mouse, By the way I'm not sure if saying "Green" will make it green. look at this ChatColor It explains the color well

Player = Game.Players.LocalPlayer
mouse = Player:GetMouse()
 mouse.Button1Down:connect(function()
game:GetService("Chat"):Chat(Player.Character.Head,"Cross Fire!","Green") -- That will make  the user who uses that script get a chat but you need to do a function and connect it
end)



3 comments

0

It's a easy way to make it green. Just try it out in studio. But still thx but I want to summon the model at the same time too.

0

Try the monsters head after it is moved to mouse.hit.p and if it's not teleporting to mouse.hit.p try Mouse.Target

0

model:MoveTo(mouse.hit.p) wait(1) -- CHAT GOES HERE -- and then remove it?...

This discussion is preserved as it was. New answers, comments, and votes are closed.