How do i make a part property change after triggerd by dialog

Hello scripters!

I am currently stuck on a diolog triggerd part. after you reply no to the part the floors cancollide property changes so you drop through the floor!

What I have so far:
image

When the player replies “No” they drop. it have not scripted it yet but I have tried…

If you could help it would mean alot!

Thanks,
BasicButterBoy

Use something like Dialog.DialogChoiceSelected to detect what dialog they picked. Here is a forum post too on an example on how it could be used, and just change what choice your looking for, and make it CanCollide of a part off if the player picked the right choice.

Thats what i did but i have a new post on it not working here

Because local scripts don’t run in the workspace… You need to move them into a container that runs local scripts and adjust the script to make it work once moved

I did that and it still didnt work…

Hey there,
Dialog doesn’t work with server scripts. If you want a part to delete on the server you can do this through remote events.

Make a RemoteEvent in ReplicatedStorage
Create a local script inside StarterGui and inside it put

local dialogpart = game.Workspace:WaitForChild("put your dialogpart here")
local rs = game:GetService("ReplicatedStorage")
local event = rs:WaitForChild("put your remote event here")

dialogpart.Dialog.DialogChoiceSelected:Connect(function(player, choice)
	if choice.Name == "No" then
		event:FireServer()
	end
end)

Then, put a serverscript in the part with your dialog, inside it put

local rs = game:GetService("ReplicatedStorage")
local event = rs:WaitForChild("put your remote event here")

event.OnServerEvent:Connect(function()
	game.Workspace.CollideFloor:Destroy()
end)

Let me know if this helps!

1 Like

This helped me alot! Thanks so much! I am stil learning remote events so if you have a devfourm post to help me that would be great!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.