Script error with ‘Anchored is not a valid member of player “players.jaidon11”’
Script ‘Workspace.Map.Activators.FallingBlock’, Line 12
What’s the issue here? How is it getting player from this?
-- Local Script, StarterCharacterScripts
local Player = game:GetService("Players").LocalPlayer
local MakeFall = workspace.Map.Activators.MakeFall
local UnstablePart = workspace.Map.Unstable.Part
UnstablePart.Touched:Connect(function(Hit)
if Hit.Parent == Player.Character then
MakeFall:FireServer(UnstablePart)
end
end)
-- Script, workspace.Map.Activators
local Remote = script.Parent.MakeFall
local function RandomSound(NewParent)
local RandomNumber = math.random(1,3)
local RandomAsset = game:GetService("ServerStorage").Sounds[RandomNumber]:Clone()
RandomAsset.Parent = NewParent
RandomAsset:Destroy()
end
Remote.OnServerEvent:Connect(function(Part)
RandomSound(Part)
Part.Anchored = false
end)