Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My water dispenser won't show the water in the cup, but it shows it coming out the spout?

If the player's cup touches the trigger part, the water comes out the spout and goes in the cup.

script.Parent.Touched:Connect(function(hit)
	if hit.Parent.Name == "Tool" then
		workspace.Water.Transparency = 0
		game.StarterPack.Tool.Handle.InCup.Transparency = 0
	end
end)

4 comments

0

You wont see changes made to the tool because the server does not have the startertools constantly updating whatever is in someone's backpack. When someone joins, all those starterpack tools get cloned to them. You'll need to change the one in backpack, or if it's equipped, the one in their character

0

So how would I clone it to the character? Because it needs to be equipped for the trigger part to work.

0

maybe hit.Parent:IsA("Tool")?

0

I'll try that..

1 answer

I think you should put this Script in the tool:

local function touch(hit)
	if hit.Parent.Name == "Dispenser" then --Change to dispenser name
		workspace.Water.Transparency = 0
		script.Parent.Handle.InCup.Transparency = 0
	end
end

script.Parent.Handle.Touched:Connect(touch)

This may or may not work.

Happy to help, b_mni.

This discussion is preserved as it was. New answers, comments, and votes are closed.