EDIT: I made a remote event, and 2 different scripts im trying to run an event where if u say a certain word near a brick it does not go well server sided script:
local badgeService = game:GetService("BadgeService")
local player = game.Players.LocalPlayer
local playerName = game.Players.LocalPlayer.Name
for i,v in pairs(workspace:GetChildren()) do
if v:IsA("Model") then
if v.Name == (playerName) then
playerRoot = v.Torso
end
end
end
modelRoot = script.Parent
--get players current distance from models center part
local distance = (playerRoot.Position - modelRoot.Position).Magnitude
--specify a radius/max distance
local radius = 15
--check to see if player is within radius
if(distance <= radius) then
player.Chatted:Connect(function(msg)
if msg == "Scary :o" then
if badgeService:UserHasBadgeAsync(player.UserId,2129136841) == false then
badgeService:AwardBadge(player.UserId,2129136841)
end
script.Parent.Call:FireClient(player)
end
end)
print("Your close to the model")
else
print("Your away from the model")
end
local sided script:
local player = game.Players.LocalPlayer
script.Parent.Call.OnClientEvent:Connect(function()
local h = Instance.new("Hint")
h.Parent = workspace
h.Text = "Should have not done that"
workspace.Scream:Play()
script.Parent.Decal.Transparency = 0
local f = Instance.new("Fire")
f.Parent = script.Parent
wait(4)
for i,v in pairs(workspace:GetDescendants()) do
if v.ClassName == "BasePart" then
v.Anchored = false
end
end
wait(5)
player:Kick("Unexpect Client Behavior Error Code: 666")
end)

3 comments
Also you can try both type of scripts
it didn't work what i wanted is that if someone said something then every part in workspace would unanchor
Oh ok then why in your scripts there is nothing about chat service