I have tried many times and have a script that just doesn't work
local part = script.Parent
part.Touched:Connect(function(hit)
print("Time part was touched by" .. hit.Name)
game.Lighting.ClockTime =14
What have I done wrong?
I have tried many times and have a script that just doesn't work
local part = script.Parent
part.Touched:Connect(function(hit)
print("Time part was touched by" .. hit.Name)
game.Lighting.ClockTime =14
What have I done wrong?
This a basic syntax error I highly suggest you open the output for debugging. Also format your code correctly
local part = script.Parent
part.Touched:Connect(function(hit)
print("Time part was touched by" .. hit.Name)
game.Lighting.ClockTime = 14
end) -- You need to end the function
You forgot a ) after end to close off the :Connect() call but this is better than the last answer
Count all the parenthesis again Connect accepts a callback argument so the closing parenthesis after end is the one you are talking about
local Players = game:GetService("Players")
local part
script.parent.Touched:Connect(function(part)
local player = Players:GetPlayerFromCharacter(part.Parent)
if not player then return end
print("Time was changed by " .. player.Name)
game.Lighting.ClockTime = math.random(23)
end)
Something like this.
-1 for no explanation
This discussion is preserved as it was. New answers, comments, and votes are closed.
8 comments
http://idownvotedbecau.se/itsnotworking http://idownvotedbecau.se/noexceptiondetails
I'm sure that's a IP grabber link. Therefore, I won't click it. ^
That is stupid bro, that is a website designed to tell why i downvoted this question
kk
Plus all sites you visit can see your IP anyways so why are you being so dramatic
IP Grabbers give people a certain persons IP, if they have a VPN on then they won't be able to see the true IP. If someone gets a real IP they can DDOS it and I don't like to trust dodgy-looking things.
go tell that to everyone at stackoverflow.com who uses idownvotedbecau.se to tell people why they downvoted a question LOL. I don't see them being DDoS'd. Plus if tons of people use a website that does that, why would they specifically do something to you, ok last off topic comment
Nice, I thought it was so you never had to call me 'stupid'. I don't use Stack Overflow so leave.