I want to make it so when anyone in the server says a certain word, the parts cancollide will equal to false allowing the player to pass through, and then when the wait timer has finished cancollide will then be equalled to true once again. Ex. I would say the word "sonic" and then the parts cancollide would equal to false. https://gyazo.com/ec750b27094add1584ed934d7d0deba4
COMMUNITY QUESTION
How do I make Cancollide false with a player saying a certain word in chat?
2 answers
Create a server script and put it in ServerScriptService
script code:
local part = workspace.??? -- replace with part you want to be cancollide false
local time = 4 -- change this to time until it goes back to being solid
game:GetService("Players").PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if string.lower(msg) == "replace this" then -- change replace to text u want player to say
if part:IsA("Part") then
part.CanCollide = false
wait(time)
part.CanCollide = true
end
end
end)
end)
didnt test it yet, replace the ??? with the part you want to change cancollide to and replace the text called "replace this" to what you want the player to say to change the part's cancollide.
This dude is a joke lol. There's no way he doesn't look something up for something that needs fixed. This counts as spam as it could be on purpose so he gets a free script :/
2 comments
0
Bro, why is this an answer?
0
^
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
According to that image, you haven't learned the basics for coding yet
is this a joke
look a the unlined part, it should be == not =
Stop being mean, back7666. That is a guy that is about to learn Lua. This is not a joke, and his answer shall be answered.
Can collide is not a valid thing in players. Read this: https://developer.roblox.com/en-us/articles/Player-Player-Collisions