Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Where exactly should I put the chatservice?

Asked by 10 years ago

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

Log in to vote
0
Answered by 10 years ago

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)



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. ChristianSenpaii 29 — 10y
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 PlatinumLocks 50 — 10y
0
model:MoveTo(mouse.hit.p) wait(1) -- CHAT GOES HERE -- and then remove it?... PlatinumLocks 50 — 10y
Ad

Answer this question