Hi, I am currently trying to make a door fall through the floor once you use a proximity prompt and its connected to a remote event, however when i turn off its CanCollide and Anchored properties to false, it doesn’t fall through the floor, it just lets you walk through it. May someone help me please?
Script (local):
local RS = game:GetService("ReplicatedStorage")
local EventFolder = RS:WaitForChild("RemoteEvent")
local Event = EventFolder:WaitForChild("BelizeEvent")
local prompt = workspace:WaitForChild("Build").Normal:WaitForChild("Pyramid"):WaitForChild("Door"):WaitForChild("PromptPart").ProximityPrompt
Event.OnClientEvent:Connect(function()
local Door = workspace:WaitForChild("Build").Normal.Pyramid:WaitForChild("Door").Door
print("Recieved")
task.wait(2)
Door.CanCollide = false
Door.Anchored = false
end)
Script (server):
local RS = game:GetService("ReplicatedStorage")
local EventFolder = RS:WaitForChild("RemoteEvent")
local Event = EventFolder:WaitForChild("BelizeEvent")
local prompt = script.Parent.PromptPart.ProximityPrompt
local Door = workspace:WaitForChild("Build").Normal.Pyramid.Door
prompt.Triggered:Connect(function(plr)
local Char = plr.Character or plr.CharacterAdded:Wait()
if Char:FindFirstChild("Key") then
Event:FireClient(plr)
print("Sent")
Char:FindFirstChild("Key"):Destroy()
end
end)