script.Parent.Parent.Block.Touched:Connect(function(Part)
workspace.PartStorage.Part.Changed = Enum.Material.Concrete
end)
ehh, hello ^w^ just make a script and what are me doing after the script has completed ^w^
thanks >w^
script.Parent.Parent.Block.Touched:Connect(function(Part)
workspace.PartStorage.Part.Changed = Enum.Material.Concrete
end)
ehh, hello ^w^ just make a script and what are me doing after the script has completed ^w^
thanks >w^
There is no need to make Part for a neutral function. Change to function() instead.
I think you meant why is the part is plastic? Easy fix. Consider replacing . Changed to . Material instead.
Need a script?
script.Parent.Parent.Block.Touched:Connect(function()
workspace.PartStorage.Part.Material = Enum.Material.Concrete
end)
thanks you so much ^w^
no problem ^w^
A I can see, You should Change function(Part) into function(hit)
The hit function is activated, When the player is touching it's part. I will show the script:
script.Parent.Parent.Block.Touched:Connect(function(hit)
local h = hit.Parent:FindFirstChild("Humanoid") -- Humanoid
if h ~= nil then
Workspace.PartStorage.Part.Material = Enum.Material.Concrete
end
end)
Here is some errors:
First of all, .Changed is an event which Activated when something changes
Second, Workspace starts with Capital W, Workspace.
And Please Note: This is a script for Humanoids [Players or NPCs] Which has Humanoid. This doesn't work Unless the Humanoid is not Parented to the Object which needs to Touch.
I hope it Help!
Actually, using "Workspace" with the capital 'W' is deprecated. "workspace" is the correct variable, with a lowercase 'W'
Why are you adding in code to check for a humanoid? It's unneeded.
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
^w^
^w^
^w^
^w^ Changed is an event, just access the Material of the part instead