Are all the assets present in the game and correctly parented to the parts, and does the ClickDetector register being clicked? Example: print(“Clicked!”)
im guessing this is a server script under then click detector, game.Players.LocalPlayer will not work, you will have to do fire a remote to the client side to change the ui
looks like this is in a localscript, my guess is that it isnt effecting the server but is effecting the client. look at the candyscollected value on both the client and server to see if its changing.
I don’t think that’ll work because the script is being put inside the object using a localscript.
local function Typewrite(Label,Text)
if typeof(Label) == “Instance” and typeof(Text) == “string” then
for i = 1,#Text,1 do
Label.Text = string.sub(Text,1,i)
task.wait(0.065)
end
end
end
local function TweenCam(Camera)
if typeof(Camera) == “Instance” then
game:GetService(“TweenService”):Create(workspace.CurrentCamera,TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{CFrame = Camera.CFrame}):Play()
end
end
game.ReplicatedStorage.GeorgieHalloween2024TalkTo.OnClientEvent:Connect(function(georgie, proximity)
proximity.Enabled = false
workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
workspace.CurrentCamera.CameraSubject = georgie.Camera
TweenCam(georgie.Camera)
script.Pig:Play()
Typewrite(script.Parent.Dialog, “Hey!! You there, could you help me find my Candy?”)
task.wait(2)
script.Pig:Play()
Typewrite(script.Parent.Dialog, “I was walking around and I realized I was missing my Candy Basket!”)
task.wait(1)
script.Pig:Play()
Typewrite(script.Parent.Dialog, “If you are able to help me, I’ll give you a limited time badge!”)
task.wait(1)
script.Parent.CandyIcon.Visible = true
script.Parent.Candys.Visible = true
TweenCam(game.Players.LocalPlayer.Character.Head)
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Head
proximity.Enabled = true
for i, candy in pairs(workspace.Halloween2024.Candy:GetChildren()) do
candy.Transparency = 0
local CandyScript = script.CandyScript:Clone()
CandyScript.Parent = candy.ClickDetector
CandyScript.Enabled = true
end
end)
localscripts can only run when parented to specific parents, setting a script’s runcontext to local will allow it to run in the workspace (which is my second guess as to why nothing is happening)