local function onPlayerChatted(player, message)
if message == “jump” then
partToChange.Transparency = 0.5
partToChange.CanCollide = false
wait(3)
partToChange.Transparency = 0
partToChange.CanCollide = true
end
end
The code is attached to a part, and I am trying to make it so that the part turns half transparent and allows my character to go through when I say “jump” but it doesn’t work
Well it would need to be in a serverscript preferably in server script service then just change the partToChange to game.Workspace[part.name] so like this:
local partToChange = game.Workspace[partNameHere]
game.Players.PlayerChatted:Connect(function(chatType, player, message, targetPlayer)
if message == "jump" then
partToChange.Transparency = 0.5
partToChange.CanCollide = false
task.wait(3)
partToChange.Transparency = 1
partToChange.CanCollide = true
end
end)