Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Apparently there was an update to Roblox and now this script won't work? Any solutions?

Asked by 5 years ago
Edited by User#5423 5 years ago

This is what I have, and in the output Im receiving a message that apparently it doesn't like/ accept the phrase "AccessoryId." Has this recently been replaced? What should I do. This is a hat giver btw

```lua local PlayersService = game:GetService("Players") part=script.Parent AccessoryId=part.Parent['AccessoryId'].Value --Do not change TimeOut=part.Parent['TimeOut'].Value --Do not change part.Touched:Connect(function(hit) if PlayersService:GetPlayerFromCharacter(hit.Parent) then --Confirm player is real, and not a NPC.

local newhat=game:GetService('InsertService'):LoadAsset(AccessoryId) for _,v in pairs (newhat:GetChildren()) do if v:IsA("Accessory") then if hit.Parent:FindFirstChild(v.Name) then v:Destroy()

elseif givehat then v.Parent=hit.Parent while wait() do ---[[Delete hat if not in workspace if v.Parent~=hit.Parent then v:Destroy()

end end ---]] end end end end end)

part.Touched:Connect(function(hit) if not deb then deb=true else return nil end if PlayersService:GetPlayerFromCharacter(hit.Parent) then part.CFrame=part.CFrame + Vector3.new(0,-0.25,0) part.BrickColor=BrickColor.new("Really red") givehat=true part.Sound:Play() wait(0.5) givehat=false part.CFrame=part.CFrame + Vector3.new(0,0.25,0) part.BrickColor=BrickColor.new("Bright green") end

wait(TimeOut) givehat=true deb=false end) ```

0
change AcessoryId for HatId 2sail2you 4 — 5y
0
change AcessoryId for HatId 2sail2you 4 — 5y
0
Edit:- code block User#5423 17 — 5y

Answer this question